Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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:

credentials=/path/to/your/file
share|improve this answer
    
Still plain text, but better than nothing. –  Stéphane Gimenez Sep 8 '11 at 15:44
add comment

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.