I'm following Tuxnetworks tutorial, at the last line of the first part and I'm getting this error:
sysadmin@samba:~$ sudo smbclient -L localhost
Enter root's password:
Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)
I've read a few other threads where people seem to have the same issue but it either doesn't get resolved or their error isn't something I'm having troubles with.
http://ubuntuforums.org/showthread.php?t=1510536 http://lists.samba.org/archive/samba/2009-March/147401.html
testparm -s
output:
Processing section ...
Global parameter logon script found in service section!
...
Loaded services file OK.
Despite the Global parameter...
error it still loads the config fine.
smb.conf
file I'm using is the one available in their tutorial with the following changes:
workgroup = MYDOMAIN.COM
netbios name = SAMBA
wins support = Yes
sudo netstat -llptun
output:
...
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 1317/slapd
tcp6 0 0 :::445 :::* LISTEN 1414/smbd
tcp6 0 0 :::389 :::* LISTEN 1317/slapd
tcp6 0 0 :::139 :::* LISTEN 1414/smbd
...
Anyone have any idea of why I would be getting NT_STATUS_CONNECTION_REFUSED
when executing smbclient -L localhost
?
Judging by all of the ubuntu in your linked tutorials, I'm going out on a limb and guessing you're on Ubuntu.
Based on your netstat output, Samba is only binding on IPv6 and not on IPv4. This can be verified with this command:
To force Samba to bind to your v4 localhost, use
interfaces
to specify the IPs to bind.