LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Windows network problems with Samba 3.5.6 over Debian Squeeze (https://www.linuxquestions.org/questions/linux-networking-3/windows-network-problems-with-samba-3-5-6-over-debian-squeeze-925679/)

prppedro 01-25-2012 01:07 PM

Windows network problems with Samba 3.5.6 over Debian Squeeze
 
Hi, all...

I'm posting this because I really can't figure out what's the real problem behind the ton of problems that happens at my network. Samba logs doesn't say too much, and I have random problems while trying to access the server.

In first place, let me show how my network is organized: The internet access and network are concentrated at a D-Link DIR-300 router. There are four computers connected to the router: "GP", the Samba server, suposed to work as master browser, and other three workstations: one running W2K3's + IIS (My laptop) and other two running WinXP Pro.

Well, until the last week, everything worked fine, execept for some nmbd breakdowns. But, when working 100%, I would browse workgroup fast and without problems (GP as master browser).

Now, nmbd would start and say that GP's is the master browser for the GPGIL workgroup. But, in fact, no browser is elected, "GP" get listed as backup server, and each computer act as his own master browser (Behavior cleary visible when using browstat).

Sometimes, the server is acessible through NetBIOS name (\\GP), sometimes, only using IP (\\198.168.0.100).

When Windows fail to access Samba via NetBIOS name, I got several errors, from 51 to 53:
51 - Network path not found.
52 - You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again. (WTF?!)
53 - No network provider accept the given path.

It doesn't seem to be a SMBD problem, because I can always access via IP.

NMBD provides the browsing, WINS and NetBIOS name facilities, so, the problem is NMBD...

If someone knows what's going on... Please tell me...

--

Logs and configuration files:
smb.conf
Code:

# Samba config file created using SWAT
# from UNKNOWN (198.168.0.105)
# Date: 2012/01/25 13:31:49

[global]
        workgroup = GPGIL
        interfaces = wlan0
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        unix password sync = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        announce version = 5.2
        name resolve order = bcast lmhosts wins host
        os level = 120
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes
        ldap ssl = no
        panic action = /usr/share/samba/panic-action %d
        admin users = root
        read list = prppedro, root
        write list = prppedro, root
        hosts allow = 198.168.0.0/255.255.255.0

[homes]
        comment = Home Directories
        valid users = %S
        create mask = 0700
        directory mask = 0700

[printers]
        comment = All Printers
        path = /var/spool/samba
        create mask = 0700
        printable = Yes
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers

[Music]
        comment = None
        path = /mnt/hdb8/Music
        write list = prppedro
        read only = No
        guest ok = Yes

[prppedro]
        path = /home/prppedro
        read only = No

[DISK]
        path = /mnt/disk/
        read list =
        write list =
        guest ok = Yes

[hda1]
        comment = Master Hard Drive A, Partition 1
        path = /mnt/hda1
        read only = No

[cell]
        comment = Célula
        path = /media/cell

[hdb9]
        comment = Former HDB12 in GP
        path = /mnt/hdb9
        read only = No

[hdb2]
        comment = Backups
        path = /mnt/hdb2
        read only = No

[lolip]
        comment = HDA1
        path = /mnt/hda1
        read only = No

[hda8]
        comment = HDB8
        path = /mnt/hdb9
        read only = No

[hdb5]
        path = /mnt/hdb5
        read only = No

[ttdata]
        comment = OpenTTD System Data
        path = /usr/share/games/openttd
        valid users = prppedro
        read only = No

log.nmbd
Code:

[2012/01/25 13:31:52,  0] nmbd/nmbd.c:857(main)
  nmbd version 3.5.6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/01/25 13:31:52.940381,  0] nmbd/nmbd_become_dmb.c:337(become_domain_master_browser_wins)
  become_domain_master_browser_wins:
  Attempting to become domain master browser on workgroup GPGIL, subnet UNICAST_SUBNET.
[2012/01/25 13:31:52.940539,  0] nmbd/nmbd_become_dmb.c:351(become_domain_master_browser_wins)
  become_domain_master_browser_wins: querying WINS server from IP 198.168.0.100 for domain master browser name GPGIL<1b> on workgroup GPGIL
[2012/01/25 13:31:58.191074,  0] nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
  *****
 
  Samba server GP is now a domain master browser for workgroup GPGIL on subnet UNICAST_SUBNET
 
  *****
[2012/01/25 13:31:58.191178,  0] nmbd/nmbd_become_dmb.c:292(become_domain_master_browser_bcast)
  become_domain_master_browser_bcast:
  Attempting to become domain master browser on workgroup GPGIL on subnet 198.168.0.100
[2012/01/25 13:31:58.191256,  0] nmbd/nmbd_become_dmb.c:305(become_domain_master_browser_bcast)
  become_domain_master_browser_bcast: querying subnet 198.168.0.100 for domain master browser on workgroup GPGIL
[2012/01/25 13:32:06.216978,  0] nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
  *****
 
  Samba server GP is now a domain master browser for workgroup GPGIL on subnet 198.168.0.100
 
  *****
[2012/01/25 13:32:14.393012,  0] nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
  *****
 
  Samba name server GP is now a local master browser for workgroup GPGIL on subnet 198.168.0.100
 
  *****
[2012/01/25 16:08:41.186265,  0] nmbd/nmbd.c:71(terminate)
  Got SIGTERM: going down...
[2012/01/25 16:08:41,  0] nmbd/nmbd.c:857(main)
  nmbd version 3.5.6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/01/25 16:08:41.237549,  0] nmbd/nmbd_become_dmb.c:337(become_domain_master_browser_wins)
  become_domain_master_browser_wins:
  Attempting to become domain master browser on workgroup GPGIL, subnet UNICAST_SUBNET.
[2012/01/25 16:08:41.237728,  0] nmbd/nmbd_become_dmb.c:351(become_domain_master_browser_wins)
  become_domain_master_browser_wins: querying WINS server from IP 198.168.0.100 for domain master browser name GPGIL<1b> on workgroup GPGIL
[2012/01/25 16:08:41.272992,  0] nmbd/nmbd_namequery.c:108(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 198.168.0.100 for name GPGIL<1d>.
  This response was from IP 198.168.0.102, reporting an IP address of 192.168.58.1.
[2012/01/25 16:08:47.492608,  0] nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
  *****
 
  Samba server GP is now a domain master browser for workgroup GPGIL on subnet UNICAST_SUBNET
 
  *****
[2012/01/25 16:08:47.492713,  0] nmbd/nmbd_become_dmb.c:292(become_domain_master_browser_bcast)
  become_domain_master_browser_bcast:
  Attempting to become domain master browser on workgroup GPGIL on subnet 198.168.0.100
[2012/01/25 16:08:47.492752,  0] nmbd/nmbd_become_dmb.c:305(become_domain_master_browser_bcast)
  become_domain_master_browser_bcast: querying subnet 198.168.0.100 for domain master browser on workgroup GPGIL
[2012/01/25 16:08:55.517352,  0] nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
  *****
 
  Samba server GP is now a domain master browser for workgroup GPGIL on subnet 198.168.0.100
 
  *****
[2012/01/25 16:09:03.527234,  0] nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
  *****
 
  Samba name server GP is now a local master browser for workgroup GPGIL on subnet 198.168.0.100
 
  *****

BROWSTAT, NET VIEW and PING executed at my W2K3 workstation:
Code:

Status for domain gpgil on transport \Device\NetBT_Tcpip_{D90D213F-2EA6-4BE8-A33
9-6976826DC74A}
    Browsing is active on domain.
    Master browser name is: PRPBOOK
        Master browser is running build 3790
    1 backup servers retrieved from master PRPBOOK
        \\GP
    Unable to retrieve server list from PRPBOOK: 71

C:\Documents and Settings\Administrator>ping gp

Pinging gp [198.168.0.100] with 32 bytes of data:

Reply from 198.168.0.100: bytes=32 time=14ms TTL=64
Reply from 198.168.0.100: bytes=32 time=10ms TTL=64
Reply from 198.168.0.100: bytes=32 time=5ms TTL=64
Reply from 198.168.0.100: bytes=32 time=13ms TTL=64

Ping statistics for 198.168.0.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 14ms, Average = 10ms

C:\Documents and Settings\Administrator>net view gp
System error 51 has occurred.

Windows cannot find the network path. Verify that the network path is correct an
d the destination computer is not busy or turned off. If Windows still cannot fi
nd the network path, contact your network administrator.


C:\Documents and Settings\Administrator>

BROWSTAT, NET VIEW and PING executed at a WinXP Workstation (Gilfredo)
Code:

Status for domain gpgil on transport \Device\NetBT_Tcpip_{787CEDB9-4473-4E60-BBD
9-0472D8872B2F}
    Browsing is active on domain.
    Master browser name is: GILFREDO
        Master browser is running build 2600
    1 backup servers retrieved from master GILFREDO
        \\GP
    Unable to retrieve server list from GILFREDO: 71

C:\Documents and Settings\prppedro>net view gp
Ocorreu o erro de sistema 52.

You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again.


C:\Documents and Settings\prppedro>ping gp

Disparando contra gp [198.168.0.100] com 32 bytes de dados:

Resposta de 198.168.0.100: bytes=32 tempo=7ms TTL=64
Resposta de 198.168.0.100: bytes=32 tempo=3ms TTL=64
Resposta de 198.168.0.100: bytes=32 tempo=2ms TTL=64
Resposta de 198.168.0.100: bytes=32 tempo=2ms TTL=64

Estatísticas do Ping para 198.168.0.100:
    Pacotes: Enviados = 4, Recebidos = 4, Perdidos = 0 (0% de perda),
Aproximar um número redondo de vezes em milissegundos:
    Mínimo = 2ms, Máximo = 7ms, Média = 3ms

C:\Documents and Settings\prppedro>

Note: These error messages are pretty random, sometimes, I get different messages in different machines.

Well, sorry for my bad english.

Thanks,
Pedro Pinheiro

allend 01-25-2012 06:43 PM

Quote:

52 - You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again. (WTF?!)
This suggests that there is a problem with DNS in your network. It seems that multiple IP addresses are trying to use the same name.

prppedro 01-26-2012 12:09 PM

Quote:

Originally Posted by allend (Post 4584553)
This suggests that there is a problem with DNS in your network. It seems that multiple IP addresses are trying to use the same name.

Well, in fact, GP gets mapped to local IP address in some network PC's. I really see this as NetBIOS broadcast failure, some problem with nmbd... And, yeah, I already checked the firewall. All ports from 135 to 138 are open, both in UDP and TCP (Just for test). 139 and 445 are open too, but these ports are operated by SMBD, and SMBD is working without problems.

Att.,
Pedro

catworld 01-28-2012 09:46 AM

One suggestion: set the router to hand out the same address to each device, most routers allow you to use DHCP but to hand the same address to each device by it's MAC number. ipconfig /all (in windows) should show you the MAC for the local device. You could set static addresses too, but using DHCP some advantages. (eg ARP cache on the router, renew dropped connections...)

Then edit the windows machine's hosts file and put the name/IP address pairing for all the machines in all the windows boxes. IIRC it's at C:\WINDOWS\system32\drivers\etc\hosts.

prppedro 01-28-2012 10:36 PM

Quote:

Originally Posted by catworld (Post 4586768)
One suggestion: set the router to hand out the same address to each device, most routers allow you to use DHCP but to hand the same address to each device by it's MAC number. ipconfig /all (in windows) should show you the MAC for the local device. You could set static addresses too, but using DHCP some advantages. (eg ARP cache on the router, renew dropped connections...)

Then edit the windows machine's hosts file and put the name/IP address pairing for all the machines in all the windows boxes. IIRC it's at C:\WINDOWS\system32\drivers\etc\hosts.

Hi, catworld... Thanks for the reply.

But, it would work if I bind 198.168.0.100 (Yeah, I've configured DHCP to always bind this IP to the server's MAC Address) to GP through hosts... As well as it works to bind my Apache domain to the same address, because PC's behind the router can't access the external DDNS domain managed by the router.

Well, the hosts file simply bind a name to a IP. But NetBIOS used to work without problems until the last week... Why should I add gp to hosts now? I want to solve the NetBIOS problem...

Sometimes, it works... And even becomes the domain master. But, sometimes the NetBIOS service goes down, each PC at network considers himself as master, and the server becomes accessible only via FQDN especified at hosts or by IP, however, pinging "gp" still showing the right IP address, and more: I can access SSH and Apache using this NetBIOS name. But I can't access the File Sharing Service... It says: "No network provider accepted the given path"... But the name exists and render to a correct IP.

Thanks,
Att.,
Pedro Pinheiro

catworld 01-29-2012 10:31 AM

Well, one test I would do is turn off the firewall completely on the server and see how things behave. Other than that I'd suspect an update perhaps altered netbios behavior. Any recent updates to any of the machines?


All times are GMT -5. The time now is 05:21 PM.