Results 1 to 7 of 7

Thread: Samba - Unable to connect - port 139 is not open

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    504

    Default Samba - Unable to connect - port 139 is not open

    Hello.

    I have some problem, with a new configuration on a new PC.
    I want to setup a SAMBA PDC using an HOWTO.
    The configuration was working on 10.0 and I use the updated howto for 10.3

    kernel 2.6.22.18-0.2

    Opensuse 10.3
    Samba-3.0.26a-3.7

    1) It seems that port 139 and 445 are not opened.

    2) smbd daemon is frequently dead.

    Any help ?

    - - - - - - - - - - - - - - -

    LINUX-SRV:~ # smbclient -L localhost -N
    Error connecting to 127.0.0.1 (Connection refused)
    Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)
    LINUX-SRV:~ #


    LINUX-SRV:~ # smbclient -L LINUX-SRV -N -p 139
    Error connecting to 192.168.130.100 (Connection refused)
    Connection to LINUX-SRV failed (Error NT_STATUS_CONNECTION_REFUSED)
    LINUX-SRV:~ #


    LINUX-SRV:~ # echo "hello" | telnet localhost 139
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    Trying ::1...
    LINUX-SRV:~ #


    LINUX-SRV:~ # echo "hello" | telnet localhost
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.
    LINUX-SRV:~ #


    LINUX-SRV:~ # netstat -an
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 0.0.0.0:901 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
    tcp 0 0 192.168.169.100:43659 130.57.4.24:80 ESTABLISHED
    udp 0 0 0.0.0.0:32768 0.0.0.0:*
    udp 0 0 0.0.0.0:514 0.0.0.0:*
    udp 0 0 192.168.169.100:137 0.0.0.0:*
    udp 0 0 0.0.0.0:137 0.0.0.0:*
    udp 0 0 192.168.169.100:138 0.0.0.0:*
    udp 0 0 0.0.0.0:138 0.0.0.0:*
    udp 0 0 0.0.0.0:68 0.0.0.0:*
    udp 0 0 0.0.0.0:5353 0.0.0.0:*
    udp 0 0 0.0.0.0:111 0.0.0.0:*
    udp 0 0 0.0.0.0:631 0.0.0.0:*
    udp 0 0 192.168.169.100:123 0.0.0.0:*
    udp 0 0 127.0.0.1:123 0.0.0.0:*
    udp 0 0 0.0.0.0:123 0.0.0.0:*
    - - - - - - - -
    - - - - - - - -
    - - - - - - - -
    - - - - - - - -
    - - - - - - - -
    - - - - - - - -
    unix 3 [ ] STREAM CONNECTED 9520 /var/run/dbus/system_bus_socket
    unix 3 [ ] STREAM CONNECTED 9519
    unix 2 [ ] DGRAM 9358
    unix 3 [ ] STREAM CONNECTED 9261
    unix 3 [ ] STREAM CONNECTED 9260
    LINUX-SRV:~ #


    LINUX-SRV:~ # netstat -an | egrep '137|138|139|445)'
    udp 0 0 192.168.169.100:137 0.0.0.0:*
    udp 0 0 0.0.0.0:137 0.0.0.0:*
    udp 0 0 192.168.169.100:138 0.0.0.0:*
    udp 0 0 0.0.0.0:138 0.0.0.0:*
    LINUX-SRV:~ #


    LINUX-SRV:~ # nmap -p 1-65535 localhost
    Starting Nmap 4.20 ( Insecure.Org - Nmap Free Security Scanner, Tools & Hacking resources ) at 2008-07-14 23:19 CEST
    Interesting ports on localhost (127.0.0.1):
    Not shown: 65528 closed ports
    PORT STATE SERVICE
    22/tcp open ssh
    23/tcp open telnet
    25/tcp open smtp
    80/tcp open http
    111/tcp open rpcbind
    631/tcp open ipp
    901/tcp open samba-swat
    Nmap finished: 1 IP address (1 host up) scanned in 5.590 seconds
    LINUX-SRV:~ #


    LINUX-SRV:~ # ping 127.0.0.1
    PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.080 ms
    64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.081 ms

    --- 127.0.0.1 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1002ms
    rtt min/avg/max/mdev = 0.080/0.080/0.081/0.009 ms
    LINUX-SRV:~ #


    LINUX-SRV:~ # ping LINUX-SRV
    PING LINUX-SRV.HATHOR.NWK (127.0.0.2) 56(84) bytes of data.
    64 bytes from LINUX-SRV.HATHOR.NWK (127.0.0.2): icmp_seq=1 ttl=64 time=0.065 ms
    64 bytes from LINUX-SRV.HATHOR.NWK (127.0.0.2): icmp_seq=2 ttl=64 time=0.070 ms
    64 bytes from LINUX-SRV.HATHOR.NWK (127.0.0.2): icmp_seq=3 ttl=64 time=0.061 ms

    --- LINUX-SRV.HATHOR.NWK ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2006ms
    rtt min/avg/max/mdev = 0.061/0.065/0.070/0.007 ms
    LINUX-SRV:~ #


    LINUX-SRV:~ # ping 192.168.169.100
    PING 192.168.169.100 (192.168.169.100) 56(84) bytes of data.
    64 bytes from 192.168.169.100: icmp_seq=1 ttl=64 time=0.087 ms
    64 bytes from 192.168.169.100: icmp_seq=2 ttl=64 time=0.065 ms
    64 bytes from 192.168.169.100: icmp_seq=3 ttl=64 time=0.069 ms

    --- 192.168.169.100 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2003ms
    rtt min/avg/max/mdev = 0.065/0.073/0.087/0.013 ms
    LINUX-SRV:~ #


    LINUX-SRV:~ # testparm
    Load smb config files from /etc/samba/smb.conf
    Processing section "[netlogon]"
    Processing section "[profiles]"
    Processing section "[printers]"
    Processing section "[print$]"
    Processing section "[public]"
    Loaded services file OK.
    Server role: ROLE_DOMAIN_PDC
    Press enter to see a dump of your service definitions

    [global]
    dos charset = 850
    unix charset = ISO8859-1
    workgroup = HATHOR.NWK
    server string = Samba Server %v
    map to guest = Bad User
    passdb backend = ldapsam:ldap://127.0.0.1/
    syslog = 0
    log file = /var/log/samba/%m.log
    max log size = 100000
    time server = Yes
    deadtime = 10
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    printcap name = cups
    add user script = /usr/local/sbin/smbldap-useradd -m "%u"
    delete user script = /usr/local/sbin/smbldap-userdel "%u"
    add group script = /usr/local/sbin/smbldap-groupadd -p "%g"
    add user to group script = /usr/local/sbin/smbldap-groupmod -m "%g" "%u"
    delete user from group script = /usr/local/sbin/smbldap-groupmod -x "%g" "%u"
    set primary group script = /usr/local/sbin/smbldap-usermod -g "%g" %u
    add machine script = /usr/local/sbin/smbldap-useradd -w -i %u
    logon script = logon.bat
    logon path =
    logon drive = V:
    logon home =
    domain logons = Yes
    os level = 65
    preferred master = Yes
    domain master = Yes
    wins support = Yes
    ldap admin dn = cn=Ldap_Admin,dc=ldap_hathor,dc=nwk
    ldap group suffix = ou=Groups
    ldap idmap suffix = ou=Idmap
    ldap machine suffix = ou=Computers,ou=Users
    ldap passwd sync = Yes
    ldap suffix = dc=ldap_hathor,dc=nwk
    ldap user suffix = ou=People,ou=Users
    create mask = 0640
    directory mask = 0750
    nt acl support = No
    printing = cups
    print command =
    lpq command = %p
    lprm command =
    case sensitive = No
    dont descend = /proc,/dev,/etc,/lib,/lost+found,/initrd

    [netlogon]
    path = /var/lib/samba/netlogon
    browseable = No

    [profiles]
    path = /var/lib/samba/profiles
    read only = No
    create mask = 0600
    directory mask = 0700
    guest ok = Yes
    profile acls = Yes
    browseable = No
    csc policy = disable

    [printers]
    comment = Network Printers
    path = /var/tmp/spool/samba
    guest ok = Yes
    printable = Yes
    browseable = No

    [print$]
    path = /var/lib/samba/drivers/
    valid users = "@Print Operators"
    write list = "@Print Operators"
    create mask = 0664
    directory mask = 0775

    [public]
    path = /data/publique
    read only = No
    guest ok = Yes
    LINUX-SRV:~ #

  2. #2
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    504

    Default Re: Samba - Unable to connect - port 139 is not open

    I must say that the Suse Firewall is not in use.

  3. #3

    Default Re: Samba - Unable to connect - port 139 is not open

    Please try below command and then make sure smb and nmb service have been actived.
    #service smb restart
    #service nmb restart
    #chkconfig --list |grep smb
    #chkconfig --list |grep nmb
    # netstat -tdlupn |egrep '(137|138|139|445)'
    tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1866/smbd
    tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1866/smbd
    udp 0 0 192.168.234.61:137 0.0.0.0:* 1907/nmbd
    udp 0 0 0.0.0.0:137 0.0.0.0:* 1907/nmbd
    udp 0 0 192.168.234.61:138 0.0.0.0:* 1907/nmbd
    udp 0 0 0.0.0.0:138 0.0.0.0:* 1907/nmbd
    Regards,
    Bryan Yu
    http://lifestory.moqin.com/

  4. #4
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    504

    Default Re: Samba - Unable to connect - port 139 is not open

    Hello.

    LINUX-SRV: # chkconfig --list grep smb

    smb 0 : off 1 : off 2 : off 3 : on 4 : off 5 : on 6 : off
    smbfs 0 : off 1 : off 2 : off 3 : on 4 : off 5 : on 6 : off

    LINUX-SRV: # chkconfig --list grep nmb

    nmb 0 : off 1 : off 2 : off 3 : on 4 : off 5 : on 6 : off

    LINUX-SRV: #

    LINUX-SRV: # netstat -tdlupn |egrep '(137|138|139|445)'
    udp 0 0 192.168.169.100:137 0.0.0.0:* 5475/nmbd
    udp 0 0 0.0.0.0:137 0.0.0.0:* 5475/nmbd
    udp 0 0 192.168.169.100:138 0.0.0.0:* 5475/nmbd
    udp 0 0 0.0.0.0:138 0.0.0.0:* 5475/nmbd
    udp 0 0 192.168.169.100:123 0.0.0.0:* 3445/ntpd
    udp 0 0 127.0.0.1:123 0.0.0.0:* 3445/ntpd
    udp 0 0 0.0.0.0:123 0.0.0.0:* 3445/ntpd
    LINUX-SRV: #


    /ETC/SERVICES

    # Larry Peterson
    netbios-ns 137/tcp # NETBIOS Name Service
    netbios-ns 137/udp # NETBIOS Name Service
    netbios-dgm 138/tcp # NETBIOS Datagram Service
    netbios-dgm 138/udp # NETBIOS Datagram Service
    netbios-ssn 139/tcp # NETBIOS Session Service
    netbios-ssn 139/udp # NETBIOS Session Service

    # RFC 1568
    microsoft-ds 445/tcp # Microsoft-DS
    microsoft-ds 445/udp # Microsoft-DS


    and don't forget this :
    -----------------------

    LINUX-SRV: # echo "hello" | telnet localhost
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.

    LINUX-SRV: # echo "hello" | telnet localhost 139
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    Trying ::1...
    LINUX-SRV: #

  5. #5
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    504

    Default Re: Samba - Unable to connect - port 139 is not open

    Hello.

    I have install a small linux on a new partition on the same PC ( with no firewall, no SAMBA, nothing but the minimum ).
    I am unable to telnet on any port.

    I think that the problem is to open port when not using the firewall. Isn't it ?

    I need help please .



    LINUX-SRV:~ # echo "hello" | telnet localhost 110
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    Trying ::1...
    LINUX-SRV:~ #


    LINUX-SRV:~ # echo "hello" | telnet localhost
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.
    LINUX-SRV:~ #

    LINUX-SRV:~ # echo "hello" | telnet localhost 139
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    Trying ::1...
    LINUX-SRV:~ #


    LINUX-SRV:~ # echo "hello" | telnet localhost
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.
    LINUX-SRV:~ #

  6. #6
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    504

    Default Re: Samba - Unable to connect - port 139 is not open

    Hi.

    Have removed samba, ldap.

    Have install last version of samba and ldap.

    Have remove all 32 bits softwares ( running an X64 processor )

    Samba is running, and ports are in action :

  7. #7
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    504

    Default Re: Samba - Unable to connect - port 139 is not open

    LINUX-SRV: # chkconfig --list | egrep '(smb|nmb)'
    nmb 0 off 1 off 2 off 3 on 4 off 5 on 6 off
    smb 0 off 1 off 2 off 3 on 4 off 5 on 6 off
    smbfs 0 off 1 off 2 off 3 on 4 off 5 on 6 off
    LINUX-SRV: #

    LINUX-SRV: # netstat -tdlupn |egrep '(137|138|139|445)'
    tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 3278/smbd
    tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 3278/smbd
    udp 0 0 192.168.169.200:137 0.0.0.0:* 2668/nmbd
    udp 0 0 0.0.0.0:137 0.0.0.0:* 2668/nmbd
    udp 0 0 192.168.169.200:138 0.0.0.0:* 2668/nmbd
    udp 0 0 0.0.0.0:138 0.0.0.0:* 2668/nmbd
    LINUX-SRV: #

    LINUX-SRV: # nmap -p 1-65535 localhost
    Starting Nmap 4.20 Nmap Free Security Scanner, Tools & Hacking resources at 2008-07-20 19:15 CEST
    Interesting ports on localhost (127.0.0.1):
    Not shown: 65526 closed ports
    PORT STATE SERVICE
    22/tcp open ssh
    23/tcp open telnet
    25/tcp open smtp
    80/tcp open http
    111/tcp open rpcbind
    139/tcp open netbios-ssn
    445/tcp open microsoft-ds
    631/tcp open ipp
    901/tcp open samba-swat
    Nmap finished: 1 IP address (1 host up) scanned in 4.679 seconds
    LINUX-SRV: #

    LINUX-SRV: # echo "bonjour" | telnet localhost 139
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.
    LINUX-SRV: #

    As I get new errors, I open a new thread.

    Thanks for your help.

    This thread should be closed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •