5

I tried to set up Samba with "unix password sync", but I still get logon failure. I am running Ubuntu Natty Narwhal.

$ smbclient -L localhost
Enter stivlo's password:
session setup failed: NT_STATUS_LOGON_FAILURE

Here is my /etc/samba/smb.conf

[global]
   workgroup = obliquid
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   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* .
   pam password change = yes
   map to guest = bad user

[www]
    path = /var/www
    browsable = yes
    read only = no
    create mask = 0755

After modifying I restarted the servers:

$ sudo restart smbd
$ sudo restart nmbd

However I still can't logon with my Unix username and password.

Can anyone please help? Thank you in advance!

4
  • 1
    Did you smbpasswd -a stivlo? Have you tried using sudo?
    – Andrew
    May 6, 2011 at 8:22
  • @Andrew No, I didn't. I thought the whole point of having "unix password sync = yes", is that you don't need separate users for Samba. Anyway, I tried, and it works. Thank you. I still wonder how to set up the user and password sync though. "sudo"? I use it for admin commands, or I run them as root, I don't get what you mean.
    – stivlo
    May 6, 2011 at 8:38
  • The point of unix password sync is to ensure that when users change their Samba password, their Unix password gets changed automatically. Nothing more. May 6, 2011 at 12:00
  • Interesting... however with my setup, I tried to change the samba password with "sudo smbpasswd stivlo", then I tried to login with SSH with the old password and it was still working. So not even this functionality is working for me.
    – stivlo
    May 6, 2011 at 14:13

1 Answer 1

4

As Andrew mentioned: sudo smbpasswd -a This command did the trick for me. Before that I used Webmin to browse samba users, and change my user password there, it did not work! To my experience, this NT_STATUS_LOGON_FAILURE error is very popular when I tried setup samba servers. The difficult thing is that there are many causes to give this same-boring-uninformative error message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .