Results 1 to 7 of 7
What is the best way to run a CIFS mount on boot, that requires a username and password for authentication?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-29-2013 #1Just Joined!
- Join Date
- Jul 2012
- Posts
- 17
CIFS mount on boot
What is the best way to run a CIFS mount on boot, that requires a username and password for authentication?
- 01-29-2013 #2
mount.cifs takes the credentials argument.
With that you can define a filename containing username/password/domain.
Place this file somewhere safe and with readonly for root (and root alone)You must always face the curtain with a bow.
- 01-29-2013 #3Just Joined!
- Join Date
- Jul 2012
- Posts
- 17
- 01-30-2013 #4Just Joined!
- Join Date
- Oct 2006
- Posts
- 2
I've appended the mount action to my /etc/fstab file and it now automatically mounts at boot time. Just what you're looking for.
Here's what the line should look like:
//192.168.1.9/documents /NAS9 smbfs user=username,passwd=password,fmast=775,uid=1000,d mast=777,gid 0 0
remote server/directory mount pt type credentials (your values should be different)
After you've added this then from the command line do "sudo mount -a" and that should be it.
Good luck.
- 01-30-2013 #5Just Joined!
- Join Date
- Jul 2012
- Posts
- 17
- 01-30-2013 #6Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 2,514
Should not make any difference where it is as long as it is on a separate line.is this applied at the top of the fstab file or the bottom?
- 01-30-2013 #7Linux Newbie
- Join Date
- Jan 2013
- Posts
- 103
Its good to have password file created and point in fstab using "credentials".


1Likes
Reply With Quote

