Samba and getpwnam() quest. - Was: Re: NIS+ solutions ? [was: A question about Auth Backends]

Gerald Carter gcarter at valinux.com
Thu Mar 29 20:32:08 GMT 2001


On Thu, 29 Mar 2001, Kervin Pierre wrote:

> First, I have a question.
> 
> Why does samba seem insist on having a /etc/passwd file to check
> uid<->username mapping, instead of using something like getpwnam() and
> friends?

Huh?  We do use getpwnam() et. al.

> I am definately not an expert UNIX programmer, but that's what seems to
> happen as far as I can tell.  We use LDAP for authentication on our
> samba server, and samba is set to do authenication=domain.  Samba would
> NOT need to know about LDAP, just as other programs don't, if it used
> the getpwnam() functions and friends.  Am I missing a something or is
> this correct. 

Are you sure you have your /etc/nsswitch.conf file correctly 
configured?  

> I say this because the only way to get samba to work is to have a copy
> of the /etc/passwd file on the server.  To do this we have a cron job
> run every 10 minutes to dump the entire LDAP database in a /etc/passwd
> file format and scp this to the samba server. 

Nah....shouldn't be doing this. If it is, then it is a bug, but 
I'll need confirmation that it is indeed the case.  A quick grep of 
2.0.7 ensure no opens on /etc/passwd.







Cheers, jerry
----------------------------------------------------------------------
   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com/  VA Linux Systems   gcarter at valinux.com
       http://www.samba.org/       SAMBA Team          jerry at samba.org
       http://www.plainjoe.org/                     jerry at plainjoe.org

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





More information about the samba-ntdom mailing list