LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-03-2009, 02:18 PM   #1
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Rep: Reputation: 15
samba stops updating user shares


When I share a new folder on my XP box it isn't picked up by samba after a while.

If I immediately connect to the network and share a folder samba picks it up. After about 10 minutes if I share another folder samba won't pick it up.

I notice the same problem with smbtree- after a while it doesn't list user shares.


After looking at wireshark I could see that samba stopped sending a "Name Query" to my XP box. XP was still refreshing it's registration about once every 5 minutes though.

I'm using samba 3.0.28a and have no firewalls on the lan, any suggestions are welcome.

smb.conf
Code:
[global]
        netbios name = SHWICK_GATEWAY
        server string = SHWICK_GATEWAY
        interfaces = lo, eth1
        bind interfaces only = Yes
        map to guest = Bad User
        passdb backend = tdbsam
        syslog only = Yes
        name resolve order = lmhosts hosts wins
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
        os level = 65
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes
        invalid users = root

[Media]
        path = /home/ftp/
        create mask = 0640
        directory mask = 0750
        guest only = Yes
        guest ok = Yes
 
Old 01-05-2009, 08:10 AM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
Browser master

You may be looking to have the machine a browser master which is set by:

os level

How to make Samba the Browse Master on a network
First, some background on 'Browse Masters' and what determines who gets to be one. A value called the 'OS level' must be set high enough to ensure that the proper machine will win the election amongst other NT machines, or even Windows95 machines. An NT domain controller uses an OS level of 32. In order for your Samba machine to beat this during the election process, it's OS level must be higher than this. I have had good luck with setting the OS level to 34 previously. The OS level can go up to 255, but Microsoft machines will not look above 32. Setting it above 32 is only useful for other Samba servers.

Actual Execution:

[global]
os level = 34 (or whatever number, up to 255)

http://support.microsoft.com/kb/188001
 
Old 01-10-2009, 07:38 PM   #3
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
Thanks. I already have samba setup to be the master browser and domain master.


I tried some stuff from the samba checklist.

The pc could ping both the samba server shwick_gateway and itself shwickhomepc.
The server couldn't ping shwickhomepc: "ping: unknown host shwickhomepc". It also couldn't ping shwick_gateway.
On the server when i do "smbclient -L shwick_gateway" I get "Connection to shwick_gateway failed (Error NT_STATUS_BAD_NETWORK_NAME)".
On the server when i do "nmblookup shwickhomepc" it returns the right ip. Also "nmblookup shwick_gateway" is successful.

It seems the netbios lookups are successful from the server and the wins lookups are successful from the pc. The wins lookups aren't successful from the server.

I have a bind setup on my machine, but I don't tell samba to check it because I want it using the wins server. I set "dns proxy = no". I get the same results with "dns proxy = yes".
 
Old 01-13-2009, 06:32 PM   #4
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
Can someone please help?
 
Old 01-16-2009, 04:35 PM   #5
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
Can someone please help?
 
Old 01-19-2009, 08:08 AM   #6
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
Did you change

os level = 65?

What did you change it to?

Also are you using an lmhosts file? If not remove lmhosts from the following line in the config:

name resolve order = lmhosts hosts wins
 
Old 01-19-2009, 08:44 PM   #7
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
Wow thanks removing the lmhosts entry worked. Samba keeps the registration of my windows pc and picks up new folders.

I thought lmhosts was created from samba's netbios server when I set wins support to yes. I see now that there was no lmhosts file, it wasn't in /etc/samba or anywhere on the hard drive.

I've had this problem for a looooong time, thanks very much for solving it.

Setting the os level to 34 didn't seem to change anything, but I have it set to 34 now.

I'll test it out with more than one client pc in the near future.

Edit: I tried adding a shared folder this morning and I have the same problem still. The folder doesn't pop up in my network places.

Last edited by Shwick; 01-20-2009 at 06:35 AM.
 
Old 01-20-2009, 07:35 AM   #8
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
I'm glad that helped, yes it's best to not supply lmhosts if you don't have the file with lmhosts listed inside.

Also you 'could' put that option last as a fallback if you were ever to use the file.

Have you set browsable on?

[MP3]
path = /Data/MP3
browseable = yes
write list = administrator


If not you won't see it in the list you would have to go there directly.
 
Old 01-20-2009, 09:47 PM   #9
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
The problem is new windows shares won't show up in my network places, I can browse the samba shares on the server no problem.

When I refresh my network places, normal working behaviour looks like this in Wireshark:

http://i42.tinypic.com/2mq5h7t.png

New windows shares stop appearing(I can't add any more) on my network places after windows sends a tree disconnect request:

http://i42.tinypic.com/2eydqvo.png

Then when I refresh my network places there are two additional lines, which I highlighted in red:

http://i39.tinypic.com/29dxxjq.png

And now I can't see new folders that I share. Somehow that tree disconnect/connect request is causing it to fail.

The wireshark captures:
when it works: http://uploading.com/files/ZX42RH5X/...orks.pcap.html
when it doesn't: http://uploading.com/files/ROBP4N1U/...esnt.pcap.html


Also, I added in "browseable = yes", but when I verified it with "sudo testparm -s smb.conf" browseable wasn't included, it was removed.

Last edited by Shwick; 01-21-2009 at 10:39 AM.
 
  


Reply



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
Updating to Hardy and problem with SAMBA shares rafeek.mk LinuxQuestions.org Member Success Stories 0 07-22-2008 03:38 AM
Another attempt to get user rw privileges for samba shares Jeebizz Slackware 10 01-11-2006 11:37 PM
Mounting Samba Shares ad user hobz Linux - Software 1 06-17-2005 10:10 PM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
User Group and samba shares Sylhouette Linux - General 0 01-09-2002 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:52 AM.

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