BartekR
2011-May-07 19:38 UTC
[Samba] Samba 3.5.8 - windows XP workstations disapear from browselist
Hello! I have small network in my work. Workstations that connects to it runs various kind of OS. This includes: 1x Windows 95 (Brother Printer) 8x Windows XP <=problematic! 2x Windows Visa 2x Windows 7 1x Samba 3.5.8 (WINS,DNS, supose to be LMB) There is a serious problem with a browselist. Ever single windows XP workstations disapear from browselist after an about 24 - 28 minutes after workstation powerup or smbd restart. After this they are still accesable by hostname, netbiosname, and ip. Other workstations are visible as they should be and don't disapear. First i thought it is an name resolution problem but i run correctly configured dns server. This server answers for both types of querry: straight (domain->ip) and reverse (address->ip).It is well tested. Also i've made /etc/hosts and /etc/samba/lmhosts files. They contains same ip=domain setup as named. Next thing was an firewall on my server (smbd and nmbd runs on it) but i found that it does not matter. Even turning off tcp_syncookies and rp_filter. Without success. I have found an article suggesting that windows xp firewall is to blame. I dont think it is a true, because workstations runs diffrent types of firewall. One of them use windows firewall but others use another firewalling sollution. Both of theese disapear from browselist in the same way. Complete disabling of XP workstation firewall does not solve problem. Every switch in my network was tested. I have excluded damaged one from topology. It was an device connecting 2 XP workstations (+uplink) on a edge of network. Still, no success with improving browselist stability. Also i have tried diffrent configurations of samba. No succes. Now i run following configuration: #================================================[global] #tested max protocol = NT1 syslog = 0 unix charset = UTF-8 dos charset = CP852 time server = yes #tested #smb ports = 139 name resolve order = wins bcast hosts lmhosts #tested #interfaces = eth0 192.168.7.1 lo 127.0.0.1 #tested #bind interfaces only = Yes #tested hosts allow = 192.168.7.0/24 127.0.0.1 #tested enhanced browsing = no keepalive = 30 loglevel = all:10 show add printer wizard = no socket options = TCP_NODELAY SO_SNDBUF=16384 SO_RCVBUF=16384 workgroup = ENELPC server string = Serwer netbios name = belphegor security = share load printers = no printcap name = /etc/printcap printing = cups guest account = nobody log file = /var/log/samba/samba.%m max log size = 10000 #tested local master = yes #tested os level = 255 #tested domain master = no #tested preferred master = yes domain logons = no #tested wins support = yes wins proxy = no #tested dns proxy = no passdb backend = tdbsam #shares below #[...] #================================================ Lines followed by "#tested" were changed to find sollution but with no success. There is log piece covering period of time while BARTEKR disappears: #================================================ [2011/05/06 20:04:03.848346, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:03.848486, 10] nmbd/nmbd_sendannounce.c:381(announce_myself_to_domain_master_browser) announce_myself_to_domain_master_browser: t (1304705033) - last(1304704509) < 900 [2011/05/06 20:04:13.851328, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:13.851467, 10] nmbd/nmbd_sendannounce.c:381(announce_myself_to_domain_master_browser) announce_myself_to_domain_master_browser: t (1304705043) - last(1304704509) < 900 [2011/05/06 20:04:13.851514, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet 192.168.7.1: netmask= 255.255.255.0: <---->ENELPC(1) current master browser = ENELPC <----><------>ENELPC 408c9a23 (Serwer) <----><------>BARTEKR 40011003 (Laptop) <----><------>DRUK-KOLOR 40002003 () [2011/05/06 20:04:13.851589, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet UNICAST_SUBNET: netmask= 127.0.0.1: <---->ENELPC(1) current master browser = UNKNOWN <----><------>ENELPC 40899a23 (Serwer) [2011/05/06 20:04:13.851669, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851706, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851740, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851774, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851807, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851841, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851874, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851907, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.851941, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.852024, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.852065, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 [2011/05/06 20:04:13.852583, 4] nmbd/nmbd_winsserver.c:2384(wins_write_database) wins_write_database: Dump of WINS name list. [2011/05/06 20:04:13.852742, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 *<20> TTL = PERMANENT 192.168.7.1 64 [2011/05/06 20:04:13.852840, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 ENELPC<20> TTL = Mon May 9 19:59:50 2011 192.168.7.1 66 [2011/05/06 20:04:13.852961, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 __SAMBA__<20> TTL = PERMANENT 192.168.7.1 64 [2011/05/06 20:04:13.853013, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 ENELPC<1b> TTL = Mon May 9 19:59:50 2011 192.168.7.1 66 [2011/05/06 20:04:13.853081, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 BARTEKR<20> TTL = Tue May 10 07:22:53 2011 192.168.7.121 44 [2011/05/06 20:04:13.853139, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 ENELPC<00> TTL = Mon May 9 19:59:50 2011 192.168.7.1 66 [2011/05/06 20:04:13.853204, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 *<00> TTL = PERMANENT 192.168.7.1 64 [2011/05/06 20:04:13.853260, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 __SAMBA__<00> TTL = PERMANENT 192.168.7.1 64 [2011/05/06 20:04:13.853309, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 ENELPC<1e> TTL = Tue May 10 07:22:53 2011 0.0.0.0 e6 [2011/05/06 20:04:13.853367, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 BARTEKR<00> TTL = Tue May 10 07:22:53 2011 192.168.7.121 44 [2011/05/06 20:04:13.853424, 18] lib/util_tdb.c:358(tdb_unpack) tdb_unpack(wbddddddd, 35) -> 31 ENELPC<03> TTL = Mon May 9 19:59:50 2011 192.168.7.1 66 [2011/05/06 20:04:13.853923, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:13.853985, 10] nmbd/nmbd_sendannounce.c:381(announce_myself_to_domain_master_browser) announce_myself_to_domain_master_browser: t (1304705053) - last(1304704509) < 900 [2011/05/06 20:04:13.854018, 3] nmbd/nmbd_serverlistdb.c:195(expire_servers) expire_old_servers: Removing timed out server BARTEKR [2011/05/06 20:04:13.854045, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet 192.168.7.1: netmask= 255.255.255.0: <---->ENELPC(1) current master browser = ENELPC <----><------>ENELPC 408c9a23 (Serwer) <----><------>DRUK-KOLOR 40002003 () [2011/05/06 20:04:13.854109, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet UNICAST_SUBNET: netmask= 127.0.0.1: <---->ENELPC(1) current master browser = UNKNOWN <----><------>ENELPC 40899a23 (Serwer) [2011/05/06 20:04:13.854212, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:13.854253, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:13.854283, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet UNICAST_SUBNET: found. [2011/05/06 20:04:13.854318, 8] lib/util.c:1869(is_myname) is_myname("ENELPC") returns 1 [2011/05/06 20:04:13.854343, 8] lib/util.c:1869(is_myname) is_myname("DRUK-KOLOR") returns 0 [2011/05/06 20:04:13.854371, 8] lib/util.c:1869(is_myname) is_myname("ENELPC") returns 1 [2011/05/06 20:04:13.854550, 3] nmbd/nmbd_serverlistdb.c:423(write_browse_list) write_browse_list: Wrote browse list into file /var/lib/samba/browse.dat [2011/05/06 20:04:23.864807, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:23.864932, 10] nmbd/nmbd_sendannounce.c:381(announce_myself_to_domain_master_browser) announce_myself_to_domain_master_browser: t (1304705053) - last(1304704509) < 900 [2011/05/06 20:04:33.875148, 4] nmbd/nmbd_workgroupdb.c:170(find_workgroup_on_subnet) find_workgroup_on_subnet: workgroup search for ENELPC on subnet 192.168.7.1: found. [2011/05/06 20:04:33.875243, 10] nmbd/nmbd_sendannounce.c:381(announce_myself_to_domain_master_browser) announce_myself_to_domain_master_browser: t (1304705063) - last(1304704509) < 900 [2011/05/06 20:04:33.875274, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet 192.168.7.1: netmask= 255.255.255.0: <---->ENELPC(1) current master browser = ENELPC <----><------>ENELPC 408c9a23 (Serwer) <----><------>DRUK-KOLOR 40002003 () [2011/05/06 20:04:33.875332, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet UNICAST_SUBNET: netmask= 127.0.0.1: <---->ENELPC(1) current master browser = UNKNOWN <----><------>ENELPC 40899a23 (Serwer) #================================================ There is an interesting communicate: #================================================[2011/05/06 20:04:13.854018, 3] nmbd/nmbd_serverlistdb.c:195(expire_servers) expire_old_servers: Removing timed out server BARTEKR #================================================ I can't get rid of it no matter of configuration. Other interesting thing: #================================================[2011/05/06 20:04:13.854109, 4] nmbd/nmbd_workgroupdb.c:281(dump_workgroups) dump_workgroups() dump workgroup on subnet UNICAST_SUBNET: netmask= 127.0.0.1: <---->ENELPC(1) current master browser = UNKNOWN <----><------>ENELPC 40899a23 (Serwer) #================================================ Current master browser unknown ? Why ? Always when i use smbclient -L belphegor i get MASTER = BELPHEGOR. Whenever i issue smbclient -L dissappeared-machine i get something like this: #================================================[root at belphegor zanik2]# smbclient -L 192.168.7.121 Enter root's password: Domain=[BARTEKR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Sharename Type Comment --------- ---- ------- IPC$ IPC Zdalne wywo?anie IPC ETYKIETY Disk ADMIN$ Disk Administracja zdalna C$ Disk Domy?lny udzia? Domain=[BARTEKR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Server Comment --------- ------- Workgroup Master --------- ------- #================================================ By using hostname i get this: #================================================[root at belphegor zanik2]# smbclient -L bartekr Enter root's password: Domain=[BARTEKR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Sharename Type Comment --------- ---- ------- IPC$ IPC Zdalne wywo?anie IPC ETYKIETY Disk ADMIN$ Disk Administracja zdalna C$ Disk Domy?lny udzia? Domain=[BARTEKR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Server Comment --------- ------- Workgroup Master --------- ------- #================================================ Asking from server about server: #================================================[root at belphegor zanik2]# smbclient -L \\192.168.7.1 Enter root's password: Domain=[ENELPC] OS=[Unix] Server=[Samba 3.5.8] Sharename Type Comment --------- ---- ------- wymiana Disk Do wymiany plikow sterowniki Disk Sterowniki do urz?dze? IPC$ IPC IPC Service (Serwer) Domain=[ENELPC] OS=[Unix] Server=[Samba 3.5.8] Server Comment --------- ------- #Those machines are visible from my XP testing machine: BELPHEGOR Serwer DRUK-KOLOR Workgroup Master --------- ------- ENELPC BELPHEGOR #================================================ Now i dont know what is to blame ... samba or maybe workstations ? What should i do next ? I have found simillar questions on internet but all of them was without an successful sollution. Maybe someone here solved this ? For me it looks like XP workstation loosing it's browser or perhaps another machine wining election ( even two LMB in one network segment!). Is there any way of debugging tis from M$ side ? Should i supply wiresharck dump or another information? If you find this post unproper for this list please let me know. I'll try another. Big THANKS Looking forward for hearing from You Thanks in advance Sorry for mine poor english ... Bartek R.
Chris Smith
2011-May-07 20:25 UTC
[Samba] Samba 3.5.8 - windows XP workstations disapear from browselist
On Sat, May 7, 2011 at 3:38 PM, BartekR <bojleros at gmail.com> wrote:> socket options = TCP_NODELAY SO_SNDBUF=16384 SO_RCVBUF=16384 > security = share > os level = 255 > domain master = no > preferred master = yesTry changing the above parameters. Eliminate, or comment out: ==========================================# socket options = TCP_NODELAY SO_SNDBUF=16384 SO_RCVBUF=16384 ========================================== Change the rest to either: ==========================================security = user os level = 32 domain master = no # preferred master = yes ==========================================or preferably this: ==========================================security = user os level = 32 domain master = yes preferred master = yes ========================================== You can still have guest shares with security = user, see: http://blog.realcomputerguy.com/2010/12/samba-and-guest-shares-with-security.html The smb.conf man page states that preferred master is best used with domain master. It doesn't hurt to have a domain controller even you don't join any systems to it.
BartekR
2011-May-08 17:59 UTC
[Samba] Samba 3.5.8 - windows XP workstations disapear from browselist
So it is Windows XP workstations to blame or maybe there is another thing that i should check ? Bartek R.
Moray Henderson
2011-May-09 09:16 UTC
[Samba] Samba 3.5.8 - windows XP workstations disapear from browselist
BartekR wrote:> So it is Windows XP workstations to blame or maybe there is another > thing that i should check ?The command nmblookup -MS -- - lists the status of all master browsers on your network. That will tell you if the problem is caused by your server losing its master status, or by something else. Moray. "To err is human; to purr, feline."
BartekR
2011-May-09 14:44 UTC
[Samba] Samba 3.5.8 - windows XP workstations disapear from browselist
# nmblookup -MS -- - INFO: Current debug levels: all: True/10 tdb: False/0 printdrivers: False/0 lanman: False/0 smb: False/0 rpc_parse: False/0 rpc_srv: False/0 rpc_cli: False/0 passdb: False/0 sam: False/0 auth: False/0 winbind: False/0 vfs: False/0 idmap: False/0 quota: False/0 acls: False/0 locking: False/0 msdfs: False/0 dmapi: False/0 registry: False/0 doing parameter show add printer wizard = no doing parameter workgroup = ENELPC doing parameter server string = Serwer doing parameter netbios name = belphegor handle_netbios_name: set global_myname to: BELPHEGOR doing parameter load printers = no doing parameter printcap name = /etc/printcap doing parameter printing = cups doing parameter Map to guest = Bad User doing parameter username map = /etc/samba/smbusers doing parameter guest account = nobody doing parameter log file = /var/log/samba/samba.%m doing parameter max log size = 10000 doing parameter local master = yes doing parameter domain logons = yes doing parameter wins support = yes doing parameter wins proxy = no doing parameter dns proxy = no doing parameter passdb backend = tdbsam doing parameter security = user doing parameter os level = 32 doing parameter domain master = yes doing parameter preferred master = yes pm_process() returned Yes lp_servicenumber: couldn't find homes set_server_role: role = ROLE_DOMAIN_PDC Substituting charset 'UTF-8' for LOCALE added interface eth0 ip=fe80::21e:c9ff:fe4b:112%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff:: added interface eth0 ip=192.168.7.1 bcast=192.168.7.255 netmask=255.255.255.0 added interface lo ip=::1 bcast=::1 netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0 bind succeeded on port 0 Socket options: SO_KEEPALIVE = 0 SO_REUSEADDR = 1 SO_BROADCAST = 1 Could not test socket option TCP_NODELAY. Could not test socket option TCP_KEEPCNT. Could not test socket option TCP_KEEPIDLE. Could not test socket option TCP_KEEPINTVL. IPTOS_LOWDELAY = 0 IPTOS_THROUGHPUT = 0 SO_SNDBUF = 114688 SO_RCVBUF = 114688 SO_SNDLOWAT = 1 SO_RCVLOWAT = 1 SO_SNDTIMEO = 0 SO_RCVTIMEO = 0 Could not test socket option TCP_QUICKACK. Socket opened. lang_tdb_init: /usr/lib/samba/pl_PL.UTF-8.msg: Nie ma takiego pliku ani katalogu querying __MSBROWSE__ on 192.168.7.255 Sending a packet of len 50 to (192.168.7.255) on port 137 read_udp_v4_socket: ip 192.168.7.1 port 35072 read: 62 parse_nmb: packet id = 13392 Received a packet of len 62 from (192.168.7.1) port 137 nmb packet from 192.168.7.1(137) header: id=13392 opcode=Query(0) response=Yes header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0 answers: nmb_name=__MSBROWSE__<01> rr_type=32 rr_class=1 ttl=259200 answers 0 char ...... hex E000C0A80701 Got a positive name query response from 192.168.7.1 ( 192.168.7.1 ) 192.168.7.1 __MSBROWSE__<01> Looking up status of 192.168.7.1 Sending a packet of len 50 to (192.168.7.1) on port 137 read_udp_v4_socket: ip 192.168.7.1 port 35072 read: 265 parse_nmb: packet id = 19307 Received a packet of len 265 from (192.168.7.1) port 137 nmb packet from 192.168.7.1(137) header: id=19307 opcode=Query(0) response=Yes header: flags: bcast=No rec_avail=No rec_des=No trunc=No auth=Yes header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0 answers: nmb_name=__MSBROWSE__<01> rr_type=33 rr_class=1 ttl=0 answers 0 char .BELPHEGOR hex 0942454C504845474F52202020202020 answers 10 char .d.BELPHEGOR hex 00640042454C504845474F5220202020 answers 20 char .d.BELPHEGOR hex 202003640042454C504845474F522020 answers 30 char d...__MSBRO hex 2020202020640001025F5F4D5342524F answers 40 char WSE__....ENELPC hex 5753455F5F0201E400454E454C504320 answers 50 char .d.ENELP hex 20202020202020201D6400454E454C50 answers 60 char C .d.ENE hex 432020202020202020201B6400454E45 answers 70 char LPC ...E hex 4C50432020202020202020201CE40045 answers 80 char NELPC .. hex 4E454C50432020202020202020201EE4 answers 90 char .ENELPC hex 00454E454C5043202020202020202020 answers a0 char ................ hex 00E40000000000000000000000000000 answers b0 char ................ hex 00000000000000000000000000000000 answers c0 char ................ hex 00000000000000000000000000000000 answers d0 char . hex 00 BELPHEGOR#00: flags = 0x64 BELPHEGOR#03: flags = 0x64 BELPHEGOR#20: flags = 0x64 __MSBROWSE__#01: flags = 0xe4 ENELPC#1d: flags = 0x64 ENELPC#1b: flags = 0x64 ENELPC#1c: flags = 0xe4 ENELPC#1e: flags = 0xe4 ENELPC#00: flags = 0xe4 BELPHEGOR<00> - H<ACTIVE> BELPHEGOR<03> - H<ACTIVE> BELPHEGOR<20> - H<ACTIVE> ..__MSBROWSE__.<01> -<GROUP> H<ACTIVE> ENELPC<1d> - H<ACTIVE> ENELPC<1b> - H<ACTIVE> ENELPC<1c> -<GROUP> H<ACTIVE> ENELPC<1e> -<GROUP> H<ACTIVE> ENELPC<00> -<GROUP> H<ACTIVE> MAC Address = 00-00-00-00-00-00 For me it looks fine. Only belphegor (192.168.7.1) answers querry. Thanks BartekR.
BartekR
2012-Jan-25 09:50 UTC
[Samba] Samba 3.5.8 - windows XP workstations disapear from browselist
Hello ! I would like to refresh this topic beacuse I have discovered something new. This problem relates only to machines with WINDOWS XP with automatic system update enabled. Win XP sp2 (fresh install) with disabled updates does not dissapear! So should i try to uninstall some of updates ?Is there any way to find the one responsible for this problem? Thanks ! BartekR