NetBIOS Name Resolution

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

NetBIOS Name Resolution

Postposted on Thu Aug 20, 2009 10:54 pm

So, on my Linux client I have to type:
Code: Select all
$ mount.cifs //ser.ve.r.ip/share mount/point


What I'd like to type is:
Code: Select all
$ mount.cifs //servername/share mount/point


I've added "wins" to the hosts line of nsswitch.conf on the client, but that didn't do the trick. Is there something I have to do on the server?

The Windows clients use the server name just fine. It's just my Linux client that does not seem to make the connection...pun intended.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: NetBIOS Name Resolution

Postposted on Fri Aug 21, 2009 2:02 am

If it's just 1 client can you manually add an entry to the hosts file? /etc/hosts I believe. this will match the hostname to IP address and you should be sweet. There could also be a different file that you do this to, but I can't remember what it is at the moment.
smakkythecamel
Graphmaster Gerbil
 
Posts: 1190
Joined: Mon Feb 11, 2002 7:00 pm

Re: NetBIOS Name Resolution

Postposted on Fri Aug 21, 2009 5:19 am

smakkythecamel wrote:If it's just 1 client can you manually add an entry to the hosts file? /etc/hosts I believe. this will match the hostname to IP address and you should be sweet. There could also be a different file that you do this to, but I can't remember what it is at the moment.

Editing the hosts file would be a last resort. Actually, I wouldn't have to edit the hosts file at all since it already has the address of the server in there.

I want to resolve the NetBIOS name, not a domain name.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: NetBIOS Name Resolution

Postposted on Fri Aug 21, 2009 6:24 am

You need to look into the configuration of winbindd that comes with Samba. It is designed to allow a Unix system to use wins name resolution. Also, the shortname of the server is likely not in the hosts file.

Change this

192.168.0.1 foobar.somedomain.com

To this

192.168.0.1 foobar.somedomain.com foobar

In the hosts file so that your system can resolve the shortname as well. If the WINS name is different then the shortname, you can append the WINS name to the line as well.

--SS
SecretSquirrel
Gerbil Jedi
Gold subscriber
 
 
Posts: 1720
Joined: Tue Jan 01, 2002 7:00 pm
Location: The Colony, TX (Dallas suburb)

Re: NetBIOS Name Resolution

Postposted on Fri Aug 21, 2009 6:49 am

SecretSquirrel wrote:You need to look into the configuration of winbindd that comes with Samba. It is designed to allow a Unix system to use wins name resolution. Also, the shortname of the server is likely not in the hosts file.

Change this

192.168.0.1 foobar.somedomain.com

To this

192.168.0.1 foobar.somedomain.com foobar

In the hosts file so that your system can resolve the shortname as well. If the WINS name is different then the shortname, you can append the WINS name to the line as well.

--SS

I know that the short name isn't in the hosts file. I haven't put it in there. Let's all forget the hosts file for a while, okay? I'm not asking how to edit that because I know precisely what to do with it. Also, it does not answer NetBIOS name resolution.

I'm looking into winbind right now. I had compiled Samba without it enabled on the Linux client, so I'll find out in a few minutes if that the solution.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: NetBIOS Name Resolution

Postposted on Fri Aug 21, 2009 7:12 am

winbind is the answer. On my client I configured the samba init script to just start winbind -- I don't need the whole server starting -- and that was it.

Thanks for the nudge, SS.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 2 guests