Samba + LDAP: smbclient -L localhost fails (NT_STATUS_CONNECTION_REFUSED)
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:
smbclient -L ::1
To force Samba to bind to your v4 localhost, use interfaces
to specify the IPs to bind.
Related videos on Youtube
user29600
Updated on September 18, 2022Comments
-
user29600 over 1 year
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 executingsmbclient -L localhost
? -
user29600 almost 13 yearswhen I execute
smbclient -L ::1
I'm now gettingNT_STATUS_LOGON_FAILURE
at least it's a different error now. What IPs do I need to use in the interfaces section? -
Deb almost 13 years@user29600
127.0.0.1/8
is good for testing IPv4 localhost, plus add whatever IPs you want to serve SMB on. -
user29600 almost 13 yearsI must have missed something in the tutorial. I've now gotten rid of the
NT_STATUS_CONNECTION_REFUSED
all together without theinterfaces
options. Now working onNT_STATUS_LOGON_FAILURE
will post back later.