David C. Rankin
2010-Dec-18 21:04 UTC
[Samba] samba 3.5.6 - ''smbclient -U% -Llocalhost' results in error - using hostname works fine, new feature?
Guys, I have probably missed an announcement or overlooked something in a changelog, but I just want to confirm what I'm seeing is expected behavior. I run samba in standalone mode and I have always checked operation with smbclient -U% -Llocalhost Now the faithful command returns an error: Connection to localhost failed (Error NT_STATUS_BAD_NETWORK_NAME) Simply using the hostname instead of localhost works, and samba continues to work fine. So this is really just confirmation request that what I'm seeing is what I'm supposed to be seeing. [14:55 nirvana:/etc] # smbclient -U% -Lnirvana Domain=[RB_LAW] OS=[Unix] Server=[Samba 3.5.6] Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service (Samba 3.5.6) <snip> So what say the experts? New security feature? -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com
Günter Kukkukk
2010-Dec-19 03:02 UTC
[Samba] samba 3.5.6 - ''smbclient -U% -Llocalhost' results in error - using hostname works fine, new feature?
Am Samstag 18 Dezember 2010, 22:04:34 schrieb David C. Rankin:> Guys, > > I have probably missed an announcement or overlooked something in a changelog, > but I just want to confirm what I'm seeing is expected behavior. I run samba in > standalone mode and I have always checked operation with > > smbclient -U% -Llocalhost > > Now the faithful command returns an error: > > Connection to localhost failed (Error NT_STATUS_BAD_NETWORK_NAME) > > Simply using the hostname instead of localhost works, and samba continues to > work fine. So this is really just confirmation request that what I'm seeing is > what I'm supposed to be seeing. > > [14:55 nirvana:/etc] # smbclient -U% -Lnirvana > Domain=[RB_LAW] OS=[Unix] Server=[Samba 3.5.6] > > Sharename Type Comment > --------- ---- ------- > IPC$ IPC IPC Service (Samba 3.5.6) > <snip> > > So what say the experts? New security feature? > >The returned error NT_STATUS_BAD_NETWORK_NAME just says, that for some reason(s) "localhost" is not a known network name anymore. Have you looked at your smb.conf option setting of "name resolve order = ..." The default is: name resolve order = lmhosts wins host bcast You can check with: testparm -vs 2>&1 | grep 'name resolve order' If you for example only set: name resolve order = wins bcast you'll get NT_STATUS_BAD_NETWORK_NAME for "localhost". What's the contents of /etc/hosts /etc/samba/lmhosts Can you ping localhost ? -------- A similar (but not equal) behaviour is seen when you omit localhost from the smb.conf option "interfaces" and also set "bind interfaces only=yes". e.g. interfaces = eth0 bind interfaces only = yes But in this case 'smbclient -L localhost -U%' will return NT_STATUS_CONNECTION_REFUSED. Cheers, G?nter