i have a command to manually mount windows shares into my linux system. Unfortunately the paths are not mounted when the system reboots. How can I add the path to the fstab table ?

 mount -t cifs -o user=myuser,domain=ad.myad.com //path/to/Software/bundles /mysoftware

The problem is I still have a password which has to be entered as soon as the command is executed.

1 Answer 1


Read the online manual for the specific section on mounting cifs file systems and you'll find an option to store the credentials in a external file so you won't have to add them to the world readable /etc/fstab and can keep those private: man mount.cifs

specifies a file /path/filename that contains a username and/or password and optionally the name of the workgroup. The format of the file is:


This is preferred over having passwords in plaintext in a shared file, such as /etc/fstab. Be sure to protect any credentials file properly.

The /etc/fstab entry will then look something like :

//path/to/Software/bundles /mysoftware cifs credentials=/path/filename,_netdev,other,options 0 0 

You must log in to answer this question.

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