I have a CIFS drive that I mount regularly, and it requires a password for it. Since it's annoying to type my password every time, I wrote a script that sets the PASSWD environment variable, mounts the drive, and then I clear it (CIFS checks the PASSWD environment variable before asking).
It works, and the script with my password is on an encrypted partition, but I don't like it.
What I would like to do instead is, since my box and the remote drive have the same plain-text password, the login manager use the password I type to try and mount the drive as well. That way my password isn't written in plain-text on my computer but I avoid having to answer yet-another-password.
Other suggestions to improving the CIFS mount login are welcome, keeping in mind I don't have root access to the server hosting the drive.
EDIT:
I have to clear up somethings:
I have root access to the client (my box), I just don't have access to the server. So all solutions must be client side.
My concern is having a plain text copy of my password for anyone who gets physical access to my laptop. Currently my /home partition is encrypted so my script is fairly secure when the laptop is off.
This is why I'd like a solution, if possible, that uses the fact that I'm typing those exact credentials to log into my user account.
/etc/fstabentry. However, you can take a look at this link. http://askubuntu.com/questions/157128/proper-fstab-entry-to-mount-a-samba-share-on-boot – Ramesh Jun 18 '14 at 14:07