I want to be able to connect to a Samba share as a specific user but I don't know his password, and I don't want to change it. I did this on Dovecot by setting up a master password, can I do something similar on Samba?

I currently have users on ldap database.


No you can't have a "master password" working for every user. You can have another account granting you access to the same resources though.

If you need the same user and do not need to be able to log in as this user repeatedly, you could

  1. retreive the password hashes (sambaLMPassword, sambaNTPassword) from LDAP beforehand
  2. reset the user's password
  3. connect to the share with the known password
  4. replace the hash attributes with the old value afterwards so the user would be able to log in with the password known to her
  • I was hopping that could do some trick with pam.d authentication – Lluís Mar 1 '13 at 8:39
  • @tictacbum but you are using the LDAP backend - pam has nothing to do with it. If you need this functionality, you will end up patching Samba to query and check against additional sambaMasterLMPassword/sambaMasterNTPassword hashes. Needless to say that it seems rather insecure. – the-wabbit Mar 1 '13 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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