Samba looking up hostnames in passwd NIS map??
Robert Dahlem
Robert.Dahlem at gmx.net
Mon Dec 4 23:28:53 GMT 2000
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.
More information about the samba
mailing list