I would like to store the passwords for CIFS volumes in gnome-keyring.

I am currently using a text file with credentials in it and passing that to pam mount / mount.cifs which then will mount the share. Is there anyway to store the credentials in an encrypted form so they are at least a little harder to get to?

1 Answer 1


Yes, I chose ecryptfs. You simply create an encrypted directory where the files are stored. See RedHat's Instructions. If you encrypt this file with the user's password, there is even the possibility to mount this directory automatically at login with pam_mount (also name of the package in fedora 15). The pam_mount setup is a bit finicky though.

My advice here: follow the instructions of the manual pages to setup pam_mount in pam.d. pam_mount will eventually use mount (mount.ecryptfs, respectively). So setup fstab in a way that your user can mount this fs without problems from the command line (possibly without root privileges). Then read pam_mount.conf, set debug=2 in the pam_mount.conf.xml reduce the requirements in pam_mount.conf to a minimum and follow the instructions in the pam_mount.conf.xml template to create a local copy.

You can test by logging in an out on a console.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .