Hi all,
First, sorry for this too long post but I've made a lot of tests and posted all the results. Well, my problem:
I'd like to access to the shared directories on my PC Windows (XP SP3) from my PC Linux (SliTaz rolling) but I get invariably the same answer: Connection to MSNET failed (Error NT_STATUS_UNSUCCESSFUL). Here is my config:
The 2 computers are connected on a box.
- PC Linux
- hostname = SAMBA
- smbclient is installed
- /etc/samba/smb.conf=
- [global]
workgroup = WORKGROUP
security = user
map to guest = Bad User[homes]
comment = Home Directories
valid users = %S
guest ok = no
read only = no
- PC Windows
- hostname = MSNET
- workgroup = WORKGROUP
$ smbclient -L MSNET -U shared
smbclient prompts me for shared's password and then after 20 seconds...
Connection to MSNET failed (Error NT_STATUS_UNSUCCESSFUL)
A search on internet learnt me it is a generic message that means "something goes wrong"...
I've tested a lot of configurations, I even crossed cables on the box.
MSNET doesn't answer when I ping it from SAMBA but SAMBA answers when I ping it from MSNET:
>ping -a SAMBA Envoi d'une requête 'ping' sur SAMBA.home [192.168.1.14] avec 32 octets de données : Réponse de 192.168.1.14 : octets=32 temps<1ms TTL=64 Réponse de 192.168.1.14 : octets=32 temps<1ms TTL=64 Réponse de 192.168.1.14 : octets=32 temps<1ms TTL=64 Réponse de 192.168.1.14 : octets=32 temps<1ms TTL=64 Statistiques Ping pour 192.168.1.14: Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%), Durée approximative des boucles en millisecondes : Minimum = 0ms, Maximum = 0ms, Moyenne = 0ms >ping -a MSNET Envoi d'une requête 'ping' sur MSNET [192.168.1.15] avec 32 octets de données : Réponse de 192.168.1.15 : octets=32 temps<1ms TTL=128 Réponse de 192.168.1.15 : octets=32 temps<1ms TTL=128 Réponse de 192.168.1.15 : octets=32 temps<1ms TTL=128 Réponse de 192.168.1.15 : octets=32 temps<1ms TTL=128 Statistiques Ping pour 192.168.1.15: Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%), Durée approximative des boucles en millisecondes : Minimum = 0ms, Maximum = 0ms, Moyenne = 0ms
Then I booted SliTaz on MSNET and run Samba, no problem. OK too when I run smbclient on MSNET and samba on SAMBA.
I finally ran smbclient with debug level 3:
$ smbclient -L MSNET -d 3 -U shared
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
added interface eth0 ip=fe80::200:e2ff:fe8d:52aa%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::
added interface eth0 ip=192.168.1.14 bcast=192.168.1.255 netmask=255.255.255.0
Client started (version 3.6.7).
Enter shared's password:
tdb(/var/run/samba/gencache.tdb): tdb_open_ex: could not open file /var/run/samba/gencache.tdb: Permission denied
resolve_lmhosts: Attempting lmhosts lookup for name MSNET<0x20>
resolve_lmhosts: Attempting lmhosts lookup for name MSNET<0x20>
resolve_wins: Attempting wins lookup for name MSNET<0x20>
resolve_wins: WINS server resolution selected and no WINS servers listed.
resolve_hosts: Attempting host lookup for name MSNET<0x20>
Connecting to 192.168.1.15 at port 445
Connecting to 192.168.1.15 at port 139
Error connecting to 192.168.1.15 (Success)
Connection to MSNET failed (Error NT_STATUS_UNSUCCESSFUL)
192.168.1.14 is the correct IP address for SAMBA and
192.168.1.15 is the correct IP address for MSNET
I scanned ports 139 and 445
- from SAMBA:
$ pscan -cb -p 139 -P 139 MSNET Scanning MSNET ports 139 to 139 Port Proto State Service 139 tcp blocked netbios-ssn 0 closed, 0 open, 1 timed out (or blocked) ports $ pscan -cb -p 445 -P 445 MSNET Scanning MSNET ports 445 to 445 Port Proto State Service 445 tcp blocked unknown 0 closed, 0 open, 1 timed out (or blocked) ports
- from MSNET:
>portqry -n msnet -o 139,445 Querying target system called: msnet Attempting to resolve name to IP address... Name resolved to 192.168.1.15 querying... TCP port 139 (netbios-ssn service): LISTENING TCP port 445 (microsoft-ds service): LISTENING >portqry -wport 139 PortQry Version 2.0 Watching port: 139 Checking for changes every 60 seconds **press escape to stop watching port ============ System Date: Fri Aug 28 21:10:50 2015 PID Port Local IP State Remote IP:Port 4 TCP 445 0.0.0.0 LISTENING 0.0.0.0:38926 4 TCP 139 192.168.1.15 LISTENING 0.0.0.0:2256 4 UDP 445 0.0.0.0 *:* 4 UDP 137 192.168.1.15 *:* 4 UDP 138 192.168.1.15 *:* Port Statistics TCP mappings: 2 UDP mappings: 3 TCP ports in a LISTENING state: 2 = 100.00% >portqry -n msnet Querying target system called: msnet Attempting to resolve name to IP address... Name resolved to 192.168.1.15 querying... TCP port 80 (http service): NOT LISTENING >portqry -n samba Querying target system called: samba Attempting to resolve name to IP address... Name resolved to 192.168.1.14 querying... TCP port 80 (http service): LISTENING
Does the problem come from port 80 on my PC Windows?
Can the firewall on the PC Windows block the communication?
...
The other problem is... , I'm totally ignorant in networking.