Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am trying to setup an auto-mounting network drive. The network drive requires a user/pass. In the man page for "mount.cifs" there are two ways to provide the user/pass.

1-[not recommended] put the user/pass in /etc/fstab
2-create a separate credentials file and put the user/pass in the credentials file

cat /etc/fstab // /imp/sql cifs credentials=/root/credentials

The file credentials contain the user name and password ( root user can read this file). and the password is stored as a plain text.

My question is how to use password encryption in CIFS/SAMBA?

share|improve this question

migrated from Oct 11 '12 at 10:23

This question came from our site for information security professionals.

The client must have access to the cleartext password in order to authenticate against the server. If you encrypt the password on the client, you would need another (cleartext) password to decrypt the encrypted password before providing it to the server. Which could then be used by a root user to decrypt the encrypted Samba password.

Even if there was a way for the client to just provide the encrypted password to the server you wouldn't have gained anything, because then the root user also would only need access to the encrypted password.

You cannot protect a system from its administrator.

share|improve this answer

Your Answer


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