[Samba] NetBIOS name resolution from Linux

Lukasz Szybalski
Sat, 17 May 2008 19:51:48 -0000

On Thu, May 15, 2008 at 7:05 PM, Olivier Parisy
<ml.olivier.parisy@free.fr> wrote:
> Hi all,
>
> I set up a Samba server (version 3.0.24) names "Lamp" on a Debian
Etch
> distribution. It provides a "guest" (guest ok = yes, guest only =
yes,
> security = SHARE) access to a "share" directory, which works
fine. Indeed, I
> can access \\lamp\share from a Windows machine (named "Ginger")
without
> issuing a password.
>
> I can also ping the Linux machine from the Windows one using "ping
Lamp",
> and get the Windows machine IP from its NetBIOS name:
> # nmblookup Ginger
> querying Ginger on 192.168.1.255
> 192.168.1.22 Ginger<00>
>
>
> But I cannot ping (or, more generally, resolve the name of) the Windows
> machine from the Linux one:
> # ping Ginger
> ping: unknown host Ginger
>
>
> I hence followed the guidelines from those links:
> http://ubuntuforums.org/archive/index.php/t-182824.html
>
http://www.linuxquestions.org/questions/linux-networking-3/linuxsamba-pdc-cant-resolve-windows-names-622797/
>
> Which means I installed winbind and modified /etc/nsswitch.conf by adding
> "wins" to the "hosts" entry. As I understand it,
winbind provides a bridge
> between nmbd and gethostbyname() by using the "Name Service
Switch". Please
> note that I am not interested in the "active directory" part of
winbind, nor
> in joining a domain, etc.
>
> Anyway, after I performed those modifications, "ping Ginger"
actually
> worked. But then, \\lamp\share could not be accessed anymore (the error
> message was "The specified group does not exist").
>
> Now, as soon as I remove the winbind package, I can access \\lamp\share
> again, but "ping Ginger" does not work anymore.
>
>
> I've been suggested on #samba to drop winbind and simply add "wins
support > yes" to smb.conf; but then "ping Ginger" does not
work any better.
>
>
> So, can I keep my simple "share" configuration, *and* integrate
NetBIOS name
> resolution to my Linux system using Name Service Switch?
>
> FWIW, I posted my smb.conf here: http://pastebin.ca/1019614
> <http://pastebin.ca/1019614> and nsswitch.conf here:
> http://pastebin.ca/1019612 <http://pastebin.ca/1019612>.
>
> Any hint would be greatly approciated. Wht should I look for?


You just need to do this:
http://lucasmanual.com/mywiki/SambaDomainController#head-8ae23b786749b4d46ef0e9ed22148e63eeab95e7

Lucas