[Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours

jgerard at wawanesa.com jgerard at wawanesa.com
Wed Jun 23 20:34:55 GMT 2004

Hi there...this problem has me banging my head against a wall....

Until last week I was running Samba 2.2.7a on an old Slack box.  I decided 
to upgrade as I needed more drive space and wanted something more current.

I went with Fedora Core 2 and am running 2.6.6-1.435 kernel.  I was using 
the default Samba install that came packaged with this release of Fedora 
and decided to try compiling/installing 3.0.4 to see if it would resolve 
my issue, which it did not.

With logging options on nmbd set to d=3, I was finally able to figure out 
why this problem was happening but now how to prevent it.

I am using Samba to do some file sharing, but more importantly for it's 
dns proxy capabilities.  We currently have 2 domain names as we migrate 
from a Novell environment to an Active Directory environment.  All windows 
clients are passed the samba server's IP for a wins address in order to do 
netbios name resolution and not have to configure 2 different domain names 
in the search suffix list.

What has been happening since I started to use this version of samba is 
that after 2 hours, certain names stop resolving.  The only way to correct 
the problem was to restart both smbd and nmbd.  I had tried restarting 
only smbd and then only nmbd but to no avail...both had to be restarted to 
get things running again.  Today I finally caught some log entries that 
showed me what was happening.

If I try to ping an address on the old domain from a windows workstation, 
in this example, "ping ns-updates", I see the following in log.nmbd: 
(ignore the timestamps as I have patched logs together to get this info)

[2004/06/23 13:56:49, 3] 
  wins_process_name_query: name query for name NS-UPDATES<00> from IP
[2004/06/23 13:56:49, 3] 
  wins_process_name_query: name query for name NS-UPDATES<00> not found - 
doing dns lookup.
[2004/06/23 13:56:49, 3] nmbd/asyncdns.c:queue_dns_query(308)
  added DNS query for NS-UPDATES<00>
[2004/06/23 13:56:49, 3] nmbd/asyncdns.c:add_dns_result(43)
  add_dns_result: DNS gave answer for NS-UPDATES of
[2004/06/23 13:56:49, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(236)
  add_name_to_subnet: Added netbios name NS-UPDATES<00> with first IP ttl=7200 nb_flags= 4 to subnet WINS_SERVER_SUBNET

The "ttl=7200" is what has me baffled.  After 2 hours has passed, If I try 
to "ping ns-updates" again, I get no reply on the windows workstation (ie, 
"Ping request could not find host ns-updates. Please check the name and 
try again." and I see the following in log.nmbd:

[2004/06/23 13:55:57, 3] 
  wins_process_name_query: name query for name NS-UPDATES<00> from IP
[2004/06/23 13:55:57, 3] 
  wins_process_name_query: name query for name NS-UPDATES<00> - name 
expired. Returning fail.

The ttl values vary, and in most cases are set to 300000, but all of the 
hosts that are set to 7200 will expire after 2 hours and I am no longer 
able to resolve these hostnames until I restart smbd and nmbd.

My smb.conf looks like this:

        log file = /usr/local/samba/var/log.%m
        load printers = yes
        name resolve order = lmhosts hosts bcast
        idmap gid = 16777216-33554431
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 
        interfaces = eth0
        null passwords = yes
        domain master = no
        hosts allow = 10.
        encrypt passwords = yes
        winbind use default domain = no
        template shell = /bin/false
        wins support = yes
        dns proxy = yes
        netbios name = wpg1lx01
        netbios aliases = zelda
        password server = None
        idmap uid = 16777216-33554431
        default = pub
        local master = no
        workgroup = TECH
        socket address =
        printcap name = /etc/printcap
        security = share
        preferred master = no
        bind interfaces only = no
        max log size = 512
        os level = 0

Right now I have a cron job set up to restart samba every 2 hours.  I 
can't have this happening if someone is accessing files off the file 
shares that I have setup.

Any help would be greatly appreciated.  I am contemplating going back to 
Samba 2.2.x to see if it resolves the issue but would really rather not 
have to do that.


Jeff Gerard - Systems Administrator
Wawanesa Mutual Insurance Company
Office: 204-985-0517
Fax:    204-947-5192
Email:  jgerard at wawanesa.com

More information about the samba mailing list