[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: userid and groups questions



On Fri, Sep 24, 1999 at 08:59:03AM -0500, Scott Rachels wrote:
> I agree that nss functions are the best way to get UNIX group membership,
> but say some 3rd party authentication system has its own database of group
> membership (defines its own groups and assigns its users to those groups).
> If I have a pam module that authenticates to this 3rd party, I want to add
> the authenticated user's groups (not Unix groups, but 3rd party auth system
> groups) to a standard list.

If you implement an initgroups() function in a glibc nss module, you can
add it to the groups: line in /etc/nsswitch.conf, and the POSIX initgroups()
function will do the right thing for you when you log in.  At first glance
this function doesn't appear to be documented in the glibc info files (at
least not for the version I have), so here's the prototype:

enum nss_status
_nss_yourdb_initgroups (const char *user, gid_t group, long int *start,
                        long int *size, gid_t *groups, long int limit,
                        int *errnop)

Nalin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []