ubuntu karmic 9.10 samba share problem

1

I am trying to debug a samba share problem with ubuntu 9.10.

Ubuntu 9.10 shares a folder, try to access from WinXP. WinXP can't see the folder.

Use netstat -anp command I found that smbd is only accept socket connection on 139 on tcp6 but not in tcp. (IPv4). Do anyone know if this is the cause the my connection problem? If so, how to fix this?

On the working samba share system (FC11), I can see the smbd is waiting in tcp port 139 and not in tcp6.

Thank

root@tlee-vm:~# netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1024/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1281/cupsd
tcp       16      0 192.168.64.141:58996    10.81.24.191:445        ESTABLISHED 3647/gvfsd-smb
tcp       24      0 127.0.1.1:40058         127.0.1.1:139           ESTABLISHED 3677/gvfsd-smb-brow
tcp        0      0 192.168.18.140:22       192.168.18.1:4107       ESTABLISHED 3953/sshd: tlee [pr
tcp6       0      0 :::139                  :::*                    LISTEN      3104/smbd
tcp6       0      0 :::22                   :::*                    LISTEN      1024/sshd
tcp6       0      0 ::1:631                 :::*                    LISTEN      1281/cupsd
tcp6       0      0 :::445                  :::*                    LISTEN      3104/smbd
tcp6       0      0 127.0.1.1:139           127.0.1.1:40058         ESTABLISHED 3679/smbd
udp        0      0 0.0.0.0:47032           0.0.0.0:*                           891/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           891/avahi-daemon: r
udp        0      0 192.168.18.140:137      0.0.0.0:*                           3100/nmbd
udp        0      0 192.168.64.140:137      0.0.0.0:*                           3100/nmbd
udp        0      0 0.0.0.0:137             0.0.0.0:*                           3100/nmbd
udp        0      0 192.168.18.140:138      0.0.0.0:*                           3100/nmbd
udp        0      0 192.168.64.140:138      0.0.0.0:*                           3100/nmbd
udp        0      0 0.0.0.0:138             0.0.0.0:*                           3100/nmbd

tony-p-lee

Posted 2009-12-22T18:38:40.540

Reputation: 591

is samba binding to the interfaces properly? please include your samba config (smb.conf) so we can troubleshoot. – quack quixote – 2009-12-22T18:41:23.933

Answers

2

You had to run smbpasswd to add the user password because Samba doesn't automatically copy the Unix passwords into its password backend.

See man smb.conf for specifics on each smb.conf parameter. The unix password sync option doesn't replace Samba's password backend with the system password subsystem. It augments it by allowing your passwd program to run when the smbpasswd is changed. Here's the specifics from the manpage (emphasis mine).

This boolean parameter controls whether Samba attempts to synchronize the UNIX password with the SMB password when the encrypted SMB password in the smbpasswd file is changed. If this is set to yes the program specified in the passwd program parameter is called AS ROOT - to allow the new UNIX password to be set without access to the old UNIX password (as the SMB password change code has no access to the old password cleartext, only the new).

Default: unix password sync = no

quack quixote

Posted 2009-12-22T18:38:40.540

Reputation: 37 382

0

sudo ufw allow 445

This worked for me. Thanks!

P.S. They need to sort this out. A new linux user would never be able to figure this out!

smaddox

Posted 2009-12-22T18:38:40.540

Reputation:

0

Got it working by:

Disable the ipv6 in Ubuntu: (Not sure if I need this step, but I don't need ipv6 anyway and not sure why samba is not binding the ipv4 port)

vi /etc/sysct.conf # and add following line; reboot
net.ipv6.conf.all.disable_ipv6=1

Use the smbpasswd to add the password for the user that need the login, I am not sure why this is needed, since my /etc/samba/smb.conf file has "unix password sync = yes" line in it.

security = user

encrypt passwords = true

passdb backend = tdbsam

obey pam restrictions = yes

unix password sync = yes

passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

BTW, if someone can tell me why I need to use smbpasswd to add the user password to the system, I will mark that as the answer.

tony-p-lee

Posted 2009-12-22T18:38:40.540

Reputation: 591

0

I just had to debug a problem connecting to a samba share on Ubuntu 9.10 from Windows XP, and I found this description of setting up samba helpful, along with this samba troubleshooting guide.

In case you're curious, my firewall on Ubuntu was blocking access. I allowed access on port 445, and it started working.

sudo ufw allow 445

Don Kirkby

Posted 2009-12-22T18:38:40.540

Reputation: 883