Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need Samba to use a different set of credentials for home shares.

The shell login password is different from the Samba login password.

I have disabled the unix password sync option, but the Samba password eventually gets replaced by the shell login password.

Is there anything I missed, or is what I'm trying to do not possible?

share|improve this question
up vote 3 down vote accepted

Your Samba password is replaced because you have pam_smbpasswd enabled in your PAM configuration. When used in the auth group, this module automatically updates the Samba account upon logging in. If you disable it, your passwords will remain separate.

The unix password sync option is for the opposite direction – it causes the Unix password to be updated when Samba is told to change its own account database.

share|improve this answer
I don't see pam_smbpasswd (or pam_smbpass) anywhere in the configuration file. Google also turned up nothing actionable. – Kevin Herrera Nov 15 '11 at 16:30
By "the file", do you mean "all files in /etc/pam.d" or something else? – grawity Nov 15 '11 at 16:44
Both /etc/pam.d/samba and /etc/samba/smb.conf. In case it helps, I'm running Ubuntu Server 10.04 LTS with Samba 3.4.7. In the pam.d one, I see 3 @include statements. – Kevin Herrera Nov 16 '11 at 17:06
/etc/pam.d/samba is only used when logging in over Samba, and I'm talking about normal system logins, so check the entire pam.d directory. (The smb.conf file is irrelevant.) – grawity Nov 16 '11 at 22:19
PAM handles user logins and only that. It's not used when restarting the entire system. PAM is, however, used when you log in to the system or when you unlock the screensaver. – grawity Nov 18 '11 at 16:43

Just for the record, I have been struggling with this problem and after trying different solutions, I have found the one that seems to work.

I had to uninstall the libpam-smbpass. So a sudo apt-get remove libpam-smbpass fixed the problem.

share|improve this answer

Just for information:

you should search "pam_smbpass" instead "pam_smbpasswd"

# grep smbpass /etc/pam.d/*
/etc/pam.d/common-auth:auth     optional               migrate
/etc/pam.d/common-password:password     optional               nullok use_authtok use_first_pass

then just delete pam_smbpass from these files.

share|improve this answer

Use the following to set your Samba Password:

sudo smbpasswd -a <username>

Then to prevent the Samba Password from sync with the Unix Password on next login do the following:

sudo pam-auth-update

Then from the interface that pops up Un-check "SMB password synchronization" and hit "OK"

share|improve this answer

You must log in to answer this question.

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