LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2003, 09:25 AM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Samba WINS Server Issues


I have two computers on a network (RH8.0 and XP) which has a Linksys router running as DHCP server. The Linux box has a static IP address while the XP box has a dynamic IP. The static IP is not part of the dynamic IP pool. The Linux box is set up to be a WINS Server (I believe... I'll add my smb.conf later in post) and my XP box is set to register with the WINS server at the Linux box's IP address. They are in the same workgroup and have different NetBIOS names.

I can connect to shares on each computer from the other, but there is no NetBIOS name resolution between the two of them. I have to connect using IP addresses both ways. Can anyone tell me where my problem is? The following is my smb.conf:

[global]
netbios name = Ash-Can Server
workgroup = ash-can
wins support = yes
hosts allow = 192.168.1.
encrypt passwords = yes

; Browsing election control
os level = 34
local master = yes
preferred master = yes

; Share defaults
guest account = netguest
writeable = no
guest ok = no
browseable = no
hide dot files = yes

[backup]
path = /backup
comment = The ash-can backup drive
browseable = yes
writeable = yes


Thanks in advance for any help.
 
Old 01-29-2003, 09:54 AM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
I posted my smb.conf file here. http://www.linuxquestions.org/questi...threadid=42235
 
Old 01-29-2003, 10:05 AM   #3
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I looked over your smb.conf and the only WINS-related command I saw was "wins support = true", which I have in my smb.conf. Can you tell me what the difference is, or what I'm doing wrong?

Plus, even if the WINS server isn't running properly for whatever reason, shouldn't names be resolved via broadcasts?
 
Old 01-29-2003, 11:35 AM   #4
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Just to check, is SAMBA started? If not type smbd start and nmbd start at the command line. Can you ping the Linux box?

Also, if the Windows machine was started before the Linux box. Then you need to do a nbtstat -R at the command line or just restart the machine. This will reload the NetBIOS cache.

The names wouldn't be resolved, NetBIOS is a MS protocol. UNIX doesn't use NetBIOS by default, you need SAMBA to do that.

Also run testparm at the command line and see if that gives you an error.

If all else fails just use my file, that will get you going.
 
Old 01-29-2003, 11:51 AM   #5
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I used testparm on my smb.conf and it worked fine. I'm sure that smbd and nmbd are running because I have the following commands in my rc.local:

smbd -D
nmbd -D

Also, I did have the Linux box up and running for a couple minutes before the XP box was turned on. How do I check the NetBIOS name table on the Linux box? (i.e. nbtstat equivalent)
 
Old 01-29-2003, 02:31 PM   #6
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I've been looking around, and I haven't found anything else regarding WINS server setup for Samba. According to everything I've read the following line is the only thing necessary to start it:

wins support = yes

So, I added the IP of the Samba server as a WINS server on the NT clients (XP and 2k)... I don't even know what I could mess with to see what the problem is. I still can't find a nbstat equivalent in Samba that displays the NetBIOS name table.

Can anyone help?
 
Old 01-29-2003, 06:54 PM   #7
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
More Information

Okay, here is what I've been doing to work on this issue since I got home:

I started out with the linux box running on a static IP address as a WINS server ("wins support = yes" in the smb.conf file). I know that smbd and nmbd are running because I have "smbd -D" and "nmbd -D" in my /etc/rc.local file. My XP box was configured to use WINS as directed by DHCP, but I still had the option to specify a WINS IP, and I specified the linux box's static IP. The DHCP was being run by the linksys router I have.

All this setup that I just described did not work. So, the first thing I changed was I set my XP box to enable WINS over TCP/IP. I don't really understand how this is different than the other options I had, but whatever. It didn't work.

So, then I looked to my router. I looked under the DHCP tab on the config pages and there was nothing about WINS. I downloaded a firmware upgrade and ther was a WINS option. I entered the IP address of my linux box under the WINS IP address. Nothing changed.

Then I changed the XP back to WINS through DHCP. Now my XP box can resolve the Linux box's NetBIOS name (using ping <Linux Box NetBIOS Name>) and can query the linux box's name table (nbtstat -a <Linux Box NetBIOS Name>). However, my linux box (supposedly the WINS server) can't resolve the XP box's name if I type ping <XP Box NetBIOS Name>. BUT, it can resolve it if I type nmblookup -T <XP Box NetBIOS Name>. If it resolves using nmblookup it takes FOREVER (like 25 seconds).

Also, if I look in Network Neighborhood on the XP box, I don't see anyone at all, including itself and the linux server. All I see on the "Entire Network" is the workgroup that both computers are in, but when I try to open that I get an error.

Given all this strangeness, I have the following questions?

1) What is actually acting as the WINS server? The DHCP router or Samba?

2) Why does the XP Box resolve the Linux NetBIOS name but the Linux box can't resolve the XP box's name?

3) Why does the XP box resolve the name via the ping command and Start->Run->\\<NetBIOS Name> and even access shares and such using the NetBIOS name but can't see the linux box in Network Neighborhood?


I am terribly intrigued if anyone has answers to these questions. I've pretty much exhausted my ideas at this point. This is supposed to be the easy part.
 
Old 01-29-2003, 08:49 PM   #8
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Remember that you also have the option of using DNS for name resolution. Microsoft has moved towards DNS. WINS is included with Windows 2000/XP more for backward compatibility than anything else.

I have installed Bind 9.x on my Linux server and my Windows machines (including Windows 98) use it without a hitch. I just add the IP address of the DNS server to the networking configuration of the Windows machines.


Re: not seeing the Linux box in network neighbourhood. I notice that some Windows machines do not browse properly unless the netbeui protocol is loaded.
 
Old 01-29-2003, 09:35 PM   #9
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Actually the easiest way would be to let it use the default method that works great on most home networks even when you throw a lan party: no dns, no wins. This is what works when you plop 2 win boxes on a network, and it works for samba too.

smb.conf:
[global]
wins support = no
os level = 32
;local master = yes
;domain master = yes
preferred master = yes
name resolve order = lmhosts bcast hosts wins

The base above should let samba kick your win boxes and force them to let samba dictate who shows up in network lists, beause samba actually does a better job at it than windows machines do. And if that doesn't work then uncomment the local and then domain master options and crank the os level up, 35, 50, 75 or whatever. If you use dns or have all your machines in /etc/hosts then you can swap resolve to " lmhosts hosts bcast wins" (hosts actually means use /etc/hosts then dns)
 
Old 01-29-2003, 10:20 PM   #10
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Good point.

I don't normally use DNS or WINS on small NT networks.

I have name resolution going because I have a test qmail environment running on the Linux machine.

Using broadcasts does increase the network traffic but this shold be negligable in this case.

I don't believe broadcasts work over routers, so bear that in mind if you want to experiment with those.
 
Old 01-30-2003, 12:32 AM   #11
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Update

Okay, I've got the WINS server running. I believe that I had the right settings multiple times, but what I wasn't doing was rebooting the computer or anything. I found that releasing and renewing the NetBIOS name using the following command helped:

nbtstat -RR


Anyway, I have a new issue. For whatever reason, whenever my Linux box becomes the master browser, I can't see anything on Network Neighborhood. I changed my smb.conf file to try NOT to be the master browser at this point, but this must be fixed. My previous settings regarding being the network browser were:

os level = 34
local master = yes
preferred master = yes

Can anyone tell me what else I should be doing to find the problem with the master browser being the Linux box? I changed the above settings to pretty much the opposite so that it never wins the election, but it still becomes the master at times because all the other computers turn off during the day and the linux server stays online.
 
Old 01-30-2003, 12:59 AM   #12
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
well you actually want samba to be browse master on your network as stated above, but to turn it off set those 3 from yes to no then change OS level to 5.

why you don't see other machines is probably due to other protocols on the win boxes so kill IPX and netbeui on them. Also take out any wins sever settings you added.
 
Old 01-30-2003, 02:12 AM   #13
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
I struggled alot with XPs having similar problems like you, although we do not use DHCP (but that possibly does not matter).

What worked for me is as follows:

I used basically the same samba settings as you (with the only exception that OS level is not explicitly specified in my smb.conf, however samba used to win browser elections in its own workgroup - but this possibly does not matter).
Changed the default settings of XPs as follows:
On the DNS tab of the TCP/IP properties panel:
- added the IP of the dns server
- in the middle of the panel choosed option 'enable attachment of primary and connection-dependent domain' (sorry but this is only a translation and is surely not very accurate)
- checked the box below it: 'attach parents of primary dns domain'
- at the bottom of the panel entered the 'domain of connection', like 'bar.hu'
- checked the box 'register connection address into dns'

On the bottom of the WINS tab I left the default setting: 'use NetBIOS settings specified on the DHCP server...'

This way I can browse network neighbourhoods located on the same subnet. If I enabled WINS, I could be possibly browse other subnets, too (but it is presently prevented by firewalls).

Last edited by J_Szucs; 01-30-2003 at 02:18 AM.
 
Old 01-30-2003, 09:20 AM   #14
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Darin: The NT boxes (2k and XP) only have TCP/IP installed on them. You want me to remove my WINS settings? All I changed was to add the IP address of the linux WINS server and to set it to take WINS settings from the DHCP router (which also has the IP of the linux WINS server in its settings). I'm curious how this would help. (that's not sarcasm. you're the expert here)

J_Szucs: I don't have a DNS server set up (yet), and I do have a WINS server up and working. I don't know if there is any information that I can use because our setups are so different regarding name resolution. Do you have any suggestions for me to try?
 
Old 01-30-2003, 09:57 AM   #15
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally posted by gauge73
You want me to remove my WINS settings? All I changed was to add the IP address of the linux WINS server and to set it to take WINS settings from the DHCP router (which also has the IP of the linux WINS server in its settings).
Now you confused me

OK for starters post these lines in your smb.conf, look for multiple instances...
wins support = no
wins server = xx.xx.xx.xx # comment this out either way
# server = is for pointing to a different WINS server
# than the samba box
wins proxy = no # this should be no regardless

At this point if WINS works keep it but if it's not working ditch it. I come from a strong NT/2K background so I sort of know all the little quirks of getting NT to be a good wins server and therefore know how to get samba to be one but I learned too much of it the hard way so if you can't figure it out, don't use it. Without WINS it's easier to configure.

If the router is just a DSL or whatever and not a windows or linux/samba box then don't tell it about any WINS servers, that just adds another variable to the mix.

If it's not working at this point, try with wins off (the 3 wins lines above) and with the globals I posted earlier and see if that doesn't work for you, make sure to take wins server settings out of the windows machines also.

ALSO: windows networking is flakey, to say the least, and samba only emulates this windows networking, though it does a better job than any win box including NT/2K servers IM(never)HO. So after you fire up all the machines go have a soda or some coffee and then come back and see if everything shows up the way you want it. It's been my experience with NetBIOS/smb/nmb/windows networking/samba that if you fix everything and then leave it alone it should work when you come back and continue working afterwords, don't even ask me why...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba WINS Server Problems (I think) skaarak Linux - Networking 2 04-28-2005 07:44 PM
samba / wins /netbios ulaoulao Linux - Networking 13 08-26-2004 06:52 AM
samba and wins hoover93 Linux - Networking 0 08-16-2004 04:25 PM
Samba WINS Server rmarvin Linux - Networking 0 10-24-2003 12:35 PM
Samba WINS server acid_kewpie Linux - Networking 1 10-03-2001 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration