You are not logged in.

#1 2012-02-01 14:21:26

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

[SOLVED] Arch/Windows XP Networking Problem

Hello all,

I have a home network of 6 computers: 3 Arch and 3 Windows XP.

Up until January, everything was working fine, every computer could see each other and their shared folders.
I browsed my network with Nautilus and I have bookmarks of Windows XP drives that are used frequently.
On one of the Windows XP computer, I do my nightly backups with Cobian.
That's where I discovered that I couldn't browse my network anymore, Cobian failed the backup on the Arch computer it needed to.
So now, Windows XP computers only see other Windows XP computers and Arch computers don't see anything...
A strange thing is that bookmarks in Nautilus are still working if I want to access Windows XP folders, but no one is able to access Arch computers (even the other Arch computers).

Windows XP computers are never updated but Arch computers are updated regularly.
Did something changed with Samba? There was an other update this morning but it didn't fix the problem...

I played around with the smb.conf, tried other configuration I found on the Internet, but nothing changed.
The only 2 minutes of hope I had was when I decided to rename my WORKGROUP to something else, I could browse the network (but still not access Arch computers) until I rebooted one of the Windows XP computer for a second time. Coincidence?

So, to sum it all, I need to see my network again and be able to access my Arch computers again.

Any help/ideas/suggestions would be greatly appreciated...

Thank you

Philippe

p.s. I know my way around computers but I am no expert. Let's try to keep it Linux 101!

Last edited by Philippe1 (2012-02-06 14:05:53)

Offline

#2 2012-02-02 01:23:51

mrxx
Member
Registered: 2011-12-24
Posts: 22

Re: [SOLVED] Arch/Windows XP Networking Problem

Philippe wrote:

[...] no one is able to access Arch computers (even the other Arch computers).

Let's make some basic Samba checks.

- Be sure your smb.conf has no errors:
testparm

- Make sure no "orphaned" Samba instances are running:
/etc/rc.d/samba stop

Check if all Samba services are stopped:
ps ax|grep mbd
You shouldn't see anything like
  901 ?        S      0:00 /usr/sbin/smbd -D
  902 ?        Ss     0:01 /usr/sbin/nmbd -D

If there are, kill them:
killall smbd nmbd

Check again:
ps ax|grep mbd

If they're still there, force kill them:
killall -9 smbd nmbd

Start your Samba services:
/etc/rc.d/samba start

Check if they are running properly:
ps ax|grep mbd
You should see something like
  897 ?        Ss     0:00 /usr/sbin/smbd -D
  901 ?        S      0:00 /usr/sbin/smbd -D
  902 ?        Ss     0:01 /usr/sbin/nmbd -D

- Now try to list and access the samba shares on the Arch computers themselves:

smbclient -L //localhost -U username
smbclient //localhost/share -U username

- If this works, try to list and access the samba shares between two Arch computers:

smbclient -L //otherarchbox -U username
smbclient //otherarchbox/share -U username

If this doesn't work, use the other Arch box's IP instead of the network name:

smbclient -L //IP -U username

If the IP method works, you may have a DNS caching problem in your network, most probably caused by one of your XP boxes. Use the following command:
ipconfig /flushdns
on all your XP boxes (as Administrator) and restart them.

Offline

#3 2012-02-02 21:05:02

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

Re: [SOLVED] Arch/Windows XP Networking Problem

First of all, thank you very much for your reply!

Sorry for the presentation, I don't know how to make cute little blue boxes...



- Be sure your smb.conf has no errors:
testparm

*****

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[Incoming]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
    workgroup = BOZO
    server string = Samba Server
    log file = /var/log/samba/%m.log
    max log size = 50
    dns proxy = No
    idmap config * : backend = tdb

[homes]
    comment = Home Directories
    read only = No
    browseable = No

[printers]
    comment = All Printers
    path = /var/spool/samba
    printable = Yes
    print ok = Yes
    browseable = No

[Incoming]
    path = /home/philippe/Incoming
    force user = philippe
    guest ok = Yes

*****

- Make sure no "orphaned" Samba instances are running:
/etc/rc.d/samba stop

*****

:: Stopping Samba Server   

*****

Check if all Samba services are stopped:
ps ax|grep mbd

*****

  799 pts/0    S+     0:00 grep mbd

*****

You shouldn't see anything like
  901 ?        S      0:00 /usr/sbin/smbd -D
  902 ?        Ss     0:01 /usr/sbin/nmbd -D

If there are, kill them:
killall smbd nmbd

*****

smbd: aucun processus trouvé
nmbd: aucun processus trouvé

*****

Check again:
ps ax|grep mbd

If they're still there, force kill them:
killall -9 smbd nmbd

*****

smbd: aucun processus trouvé
nmbd: aucun processus trouvé

*****

Start your Samba services:
/etc/rc.d/samba start

*****

:: Starting Samba Server

*****

Check if they are running properly:
ps ax|grep mbd

You should see something like
  897 ?        Ss     0:00 /usr/sbin/smbd -D
  901 ?        S      0:00 /usr/sbin/smbd -D
  902 ?        Ss     0:01 /usr/sbin/nmbd -D

*****

  834 ?        Ss     0:00 /usr/sbin/smbd -D
  838 ?        S      0:00 /usr/sbin/smbd -D
  839 ?        Ss     0:00 /usr/sbin/nmbd -D
  841 pts/0    S+     0:00 grep mbd

*****

- Now try to list and access the samba shares on the Arch computers themselves:
smbclient -L //localhost -U username

*****

Anonymous login successful
Domain=[BOZO] OS=[Unix] Server=[Samba 3.6.3]

    Sharename       Type      Comment
    ---------       ----      -------
    Incoming        Disk      No comment
    IPC$            IPC       IPC Service (Samba Server)
    Virtual_PDF_Printer Printer   Virtual PDF Printer
    Deskjet         Printer   Deskjet 5940C
    hp1020@192.168.1.104 Printer   HP LaserJet 1020
Anonymous login successful
Domain=[BOZO] OS=[Unix] Server=[Samba 3.6.3]

    Server               Comment
    ---------            -------
    DANIELLA             Samba
    PHIL-BUREAU          Samba Server

    Workgroup            Master
    ---------            -------
    BOZO                 DANIELLA

*****

smbclient //localhost/share -U username

*****

Anonymous login successful
Domain=[BOZO] OS=[Unix] Server=[Samba 3.6.3]

    Sharename       Type      Comment
    ---------       ----      -------
    Incoming        Disk      No comment
    IPC$            IPC       IPC Service (Samba Server)
    Virtual_PDF_Printer Printer   Virtual PDF Printer
    Deskjet         Printer   Deskjet 5940C
    hp1020@192.168.1.104 Printer   HP LaserJet 1020
Anonymous login successful
Domain=[BOZO] OS=[Unix] Server=[Samba 3.6.3]

    Server               Comment
    ---------            -------
    DANIELLA             Samba
    PHIL-BUREAU          Samba Server

    Workgroup            Master
    ---------            -------
    BOZO                 DANIELLA

*****

- If this works, try to list and access the samba shares between two Arch computers:
smbclient -L //otherarchbox -U username

*****

Connection to daniella failed (Error NT_STATUS_CONNECTION_REFUSED)

*****

smbclient //otherarchbox/share -U username

*****

Connection to daniella failed (Error NT_STATUS_CONNECTION_REFUSED)

*****

If this doesn't work, use the other Arch box's IP instead of the network name:
smbclient -L //IP -U username

*****

Connection to 192.168.1.104 failed (Error NT_STATUS_CONNECTION_REFUSED)

*****

I removed completely and reinstalled:
- samba
- smbclient
- gvfs
- gvfs-smb
- gnome-vfs
- nautilus

Nothing changed... I still:
- can't see my Windows network in Nautilus
- can't see my Arch computers in Windows
- can't access my Arch computers from other computers
- can connect to my Windows shares from Arch computers

Thanks again

Philippe

Offline

#4 2012-02-02 21:37:47

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [SOLVED] Arch/Windows XP Networking Problem

Philippe1 wrote:

I don't know how to make cute little blue boxes...

Just wrap whatever you're posting in code tags, like this:

[code]
your_output_goes_here
[/code]

Offline

#5 2012-02-02 22:08:54

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

Re: [SOLVED] Arch/Windows XP Networking Problem

Thank you

Offline

#6 2012-02-03 16:00:25

mrxx
Member
Registered: 2011-12-24
Posts: 22

Re: [SOLVED] Arch/Windows XP Networking Problem

Login as root.
Check if any iptables rules block the Samba ports:

iptables -L

Check on which interfaces the Samba daemons are listening:

lsof -ni:137 -ni:445

Offline

#7 2012-02-04 02:22:24

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

Re: [SOLVED] Arch/Windows XP Networking Problem

*** Check if any iptables rules block the Samba ports:

[root@phil-bureau philippe]# iptables -L
bash: iptables : commande introuvable

I'm not using iptables, should I?

*** Check on which interfaces the Samba daemons are listening:

[root@phil-bureau philippe]# lsof -ni:137 -ni:445
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
smbd    429 root   27u  IPv6   7317      0t0  TCP *:microsoft-ds (LISTEN)
nmbd    432 root    9u  IPv4   7223      0t0  UDP *:netbios-ns 
nmbd    432 root   11u  IPv4   7437      0t0  UDP 192.168.1.100:netbios-ns 
nmbd    432 root   12u  IPv4   7438      0t0  UDP 192.168.1.255:netbios-ns 

Tanks for your interest, I hope it gives you some clues...

p.s. I am now able to browse the network with Nautilus. I don't know if it's related to the problem but I also had Thunar installed.
I removed Thunar and from there I was able to see my network. I reinstalled Thunar to reproduce the problem but it is still working.
Just to be sure, I removed Thunar again since I'm not using it anyways...

So now, I still can't access my Arch computers' shares. Is it iptables, smb.conf, etc???

Offline

#8 2012-02-04 18:59:24

mrxx
Member
Registered: 2011-12-24
Posts: 22

Re: [SOLVED] Arch/Windows XP Networking Problem

Philippe1 wrote:

I'm not using iptables, should I?

No, you don't have to. But if you were, this may have been a possibility for your problems.

- Sorry, I had a typo in the Netbios Session port (137 instead of 139).

Please show me the output of

lsof -ni:139

Additionally, you could check if the Samba ports are accessible from the other Arch machine:

nmap -p 139,445 otherarchbox

Offline

#9 2012-02-04 19:57:50

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

Re: [SOLVED] Arch/Windows XP Networking Problem

Thanks again for your reply, here are the results:

[root@phil-bureau philippe]# lsof -ni:139
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
smbd    424 root   28u  IPv6   7293      0t0  TCP *:netbios-ssn (LISTEN)

And...

[root@phil-bureau philippe]# nmap -p 139,445 daniella

Starting Nmap 5.51 ( http://nmap.org ) at 2012-02-04 14:56 EST
Failed to resolve given hostname/IP: daniella.  Note that you can't use '/mask' AND '1-4,7,100-' style IP ranges
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.35 seconds
[root@phil-bureau philippe]# nmap -p 139,445 192.168.1.104

Starting Nmap 5.51 ( http://nmap.org ) at 2012-02-04 14:56 EST
Nmap scan report for 192.168.1.104
Host is up (0.00020s latency).
PORT    STATE  SERVICE
139/tcp closed netbios-ssn
445/tcp closed microsoft-ds
MAC Address: 00:0D:60:3F:BD:63 (IBM)

Nmap done: 1 IP address (1 host up) scanned in 0.45 seconds

Does it help?

Offline

#10 2012-02-05 01:13:44

mrxx
Member
Registered: 2011-12-24
Posts: 22

Re: [SOLVED] Arch/Windows XP Networking Problem

Philippe1 wrote:

Does it help?

You bet! Your Samba is only listening on IPv6, but IPv4 is required for standard sharing to Windows XP (if IPv6 has not been deliberately enabled there).
The nmap (which by default is only scanning IPv4) also shows the ports on your box are closed.
(The error in your first nmap attempt also indicates a DNS problem, but that's another story).

So, just to be sure (and even if it should be a Samba default), please add the following option to the end of your [global] section in smb.conf:

bind interfaces only = no

and restart Samba:

/etc/rc.d/samba restart

There should be now show both IPv4 and IPv6 listeners, as shown here (from my machine):

lsof -ni:139
COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
smbd    27244 root   28u  IPv6 1472692      0t0  TCP *:netbios-ssn (LISTEN)
smbd    27244 root   30u  IPv4 1472696      0t0  TCP *:netbios-ssn (LISTEN)

If this is the case, you're already done. Ignore the following and just jump to the end of my post ("restart XP machines").


If there is still only the IPv6 listener, you basically have two options.
1. Either enable IPv6 in XP (which is possible from SP2 upwards, but with lack of DHCPv6 functionality).
2. or force bind Samba to IPv4, which is the easier way.

Again, in the [global] section in smb.conf, change the "bind interfaces only" option we've just added above from "no" to "yes" and add one more line:

interfaces = 127.0.0.1 eth0
bind interfaces only = yes

(Depending on your network configuration, it may be necessary to replace eth0 with br0 (for bridged networking) or even add it.
ifconfig will show you your active interfaces.)

Then restart Samba:

/etc/rc.d/samba restart

Now let's check the Netbios listener again. It should be listening on IPv4, at last:

lsof -ni:139
COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
smbd    27013 root   28u  IPv4 1454450      0t0  TCP 127.0.0.1:netbios-ssn (LISTEN)

and nmap should now show the ports 'open' from outside.


At this point, it is a good idea to restart your XP machines.
Then try to connect to your Arch box(es).

Be patient, it can take 15-45 minutes for a standalone Windows machine to update its Netbios cache.
A right click on "Network Neighborhood" and "Find computer" may speed things up.
Once it has found the other computer, further network connects will be fast again.

Offline

#11 2012-02-05 14:56:51

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

Re: [SOLVED] Arch/Windows XP Networking Problem

Hi again!

We are very close to a solution!

I added : bind interfaces only = no
And then : /etc/rc.d/samba restart
And Voilà! everything was working again!

I rebooted and the ports were still closed...

I did : /etc/rc.d/samba restart
And then the ports were opened and it was working again

So even if the line : bind interfaces only = no is there or not, only /etc/rc.d/samba restart fixes the problem...

So, I put : sudo /etc/rc.d/samba restart in my autostart and it's working every time. But why?
Why do I have to restart samba???
Is there something wrong with that line in my rc.conf?

DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng samba @alsa @cupsd avahi-daemon)

Thanks again for your help!

Offline

#12 2012-02-05 16:41:20

mrxx
Member
Registered: 2011-12-24
Posts: 22

Re: [SOLVED] Arch/Windows XP Networking Problem

Philippe1 wrote:

DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng samba @alsa @cupsd avahi-daemon)
Is there something wrong with that line in my rc.conf?

Well, you are preventing your network interfaces from starting at boot time by prefixing 'network' with an exclamation mark...

(Aside from that, I dont' know the 'dhcdbd' entry. Did you intend to disable 'dhcpcd' ?)

FYI, the line from my rc.conf:

DAEMONS=(syslog-ng network netfs crond sshd hal rpcbind gamin avahi-daemon cupsd samba)

After fixing this, you can most likely remove the "bind interfaces only" again as it is a Samba default anyway, but on some machines has been a solution to binding problems.
The Samba restart script in your Autostart folder should then be obsolete, too.

Offline

#13 2012-02-06 14:05:25

Philippe1
Member
From: Montréal, Canada
Registered: 2011-04-11
Posts: 24

Re: [SOLVED] Arch/Windows XP Networking Problem

Got it!!!

I looked at your rc.conf and decided to move around the samba daemon, and this is where it has to go:

DAEMONS=(dbus samba networkmanager syslog-ng @alsa @cupsd avahi-daemon)

If samba starts before networkmanager, which replaces network in my case (Archbang), then it works everytime : ports opened when I boot.

Thanks again, I really appreciated your patience and suggestions.

Have a great day!

Philippe

Offline

Board footer

Powered by FluxBB