I have the following in my /etc/fstab on a Red Hat 5 system:

//share/folder /mnt/folder cifs username=<my username>,password=<my password>,ro,soft,nounix

Can I replace this with something that will still mount //share/folder on my Linux box on startup without storing my plain text password in fstab?


You can make a separate file with the following lines, and make it readable by root only:

username=<my username>
password=<my password>

Then in /etc/fstab, replace the username and password options with:

  • Still plain text, but better than nothing. – Stéphane Gimenez Sep 8 '11 at 15:44

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.