Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer
    
I was hopping that could do some trick with pam.d authentication –  tictacbum 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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