Samba looking up hostnames in passwd NIS map??

Jesse Asher jwasher at orion.hd.intel.com
Tue Dec 5 13:46:36 GMT 2000


Thanks Robert!  Nice analysis....

Robert Dahlem wrote:

> Jesse,
>
> On Mon, 04 Dec 2000 15:45:04 -0500, Jesse Asher wrote:
>
> >> >I've looked through the archives for this list and couldn't find
> >> >mention of a strange behavior I'm seeing.
>
> >> >I've got a Win98 system that is trying to map a share from my
> >> >Samba server running Solaris 7 and Samba 2.0.7.
>
> >> >When I  map the network drive (the share is /tmp on the server),
> >> >Samba does attempt to contact the NIS server (the nsswitch.conf
> >> >file has "hosts:  files nis"), but it  looks up the hostname of
> >> >the Win98 box i(jwasher-mobl) n the passwd NIS map!  As you can
> >> >see below, it makes various NIS calls and then finally queries my
> >> >real loginid (jwasher) and quits.
>
> >> I bet your problem is "security = share".
>
> >I have spent considerable amount of time reading the man page.  Since
> >my setting is actually "security = USER", I don't think this is the
> >problem.
>
> A little snooping through the sources and a short test revealed this
> indeed seems to be independent from the security setting and I lost
> that bet.
>
> In lib/system.c you will find sys_getpwnam() calling getpwnam(). This
> seems to be one triggering passwd lookups at the server in your NIS
> environment.
>
> When a session setup packet arrives, the sequence is roughly like
> this:
>
>     smbd/reply.c:reply_special()
>         here the netbios name of the sender gets extracted
>             (name2 goes to remote_machine)
>     calls smbd/password.c:add_session_user(remote_machine)
>     calls lib/username.c:Get_Pwnam(remote_machine, True)
>         tries with various lower/upper cases of remote_machine
>         when second argument == True
>     calls lib/username.c:_Get_Pwnam()
>     calls lib/system.c:sys_getpwnam()
>
> Well, the question comes up why reply_special() tries to add the
> clients netbios name to the list of users in this session when not
> running with security = share? But that goes far beyond my knowledge
> of Samba. :-) You might try to ask on samba-technical.
>
> Regards,
>         Robert
>
> --
> ---------------------------------------------------------------
> Robert.Dahlem at gmx.net           Fax +49-69-432647
> ---------------------------------------------------------------
>
> Sent using PMMail (http://www.pmmail2000.com) - fast, decent, email
> software; far better than Outlook. Try it sometime.

--
Jesse W. Asher
Sr. Manager of Information Technology
Intel Corporation
Office: (727)953-7004


-------------- next part --------------
A non-text attachment was scrubbed...
Name: jwasher.vcf
Type: text/x-vcard
Size: 403 bytes
Desc: Card for Jesse Asher
Url : http://lists.samba.org/archive/samba/attachments/20001205/b4d94abf/jwasher.vcf


More information about the samba mailing list