Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
when I execute smbclient -L ::1 I'm now getting NT_STATUS_LOGON_FAILURE at least it's a different error now. What IPs do I need to use in the interfaces section? –  user29600 Jul 8 '11 at 16:21
    
@user29600 127.0.0.1/8 is good for testing IPv4 localhost, plus add whatever IPs you want to serve SMB on. –  sysadmin1138 Jul 8 '11 at 16:25
    
interfaces = 127.0.0.1/8 didn't change anything... still getting the NT_STATUS_CONNECTION_REFUSED –  user29600 Jul 8 '11 at 16:37
    
I must have missed something in the tutorial. I've now gotten rid of the NT_STATUS_CONNECTION_REFUSED all together without the interfaces options. Now working on NT_STATUS_LOGON_FAILURE will post back later. –  user29600 Jul 8 '11 at 18:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.