password API needed

Gerald Carter cartegw at Eng.Auburn.EDU
Thu May 21 14:08:57 GMT 1998

On Fri, 22 May 1998, Luke Kenneth Casson Leighton wrote:

> there are checks in password.c and smbpasswd.c to check that there exists
> a unix account for the smb (nt) user with same name / same unix uid.
> is this done through a single function, for consistency?  _should_ it?
> should NIS+ be added ("passwd.org_dir") or is the standard getpwnam()
> sufficient?

getpwnam() should work.

At our site, we run NIS+ in NIS compatibility mode on Solaris 2.5.1 & 2.6
assume the local passwd file is thus...


The getpwnam () will return the NIS'fied version of /etc/passwd ( the + at
the end does this ) but the shell for every user not specifically in the
local /etc/passwd file will be /bin/False.

I had to deal with this when adding code to check for a valid shell on the
user for domain logins from Win 95.  If this is not a problem, then your
are OK, but depending on some sites....well you know the drill. :)

Hope thsi helps,
                            Gerald ( Jerry ) Carter	
Engineering Network Services                           Auburn University 
jerry at   

       "...a hundred billion castaways looking for a home."
                                  - Sting "Message in a Bottle" ( 1979 )

More information about the samba-technical mailing list