SLUG Mailing List Archives
Re: [SLUG] Fwd: pam_smb question
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Fwd: pam_smb question
- From: Del <del@xxxxxxxxxxxx>
- Date: Mon May 28 16:14:02 2001
- Organization: Babel Com Australia
> Del was once rumoured to have said:
> > Luke McKee wrote:
> > Some older brain dead programs don't even do an NSS lookup, preferring
> > to read /etc/passwd themselves, or do getpwent(). If you find one,
> > shoot it.
> Uh, getpwent() goes through the nss system. read nsswitch.conf(5),
> under passwd. Its this fact that also allows NIS so work everywhere
> automatically when its enabled.
getpwent() isn't guaranteed to be implemented, or implemented in the
same way, for all NSS types.
Most programs should use getpwnam() (preferably) or getpwuid() instead.
For example, getpwent() is not implemented for nss_nds, and only
returns users in the root container for nss_ldap. Also be aware
that getpwuid() returns NULL for nss_ldap under certain circumstances.