Automount Samba Shares Ubuntu

In order to permanently mount your SMB share use the following procedure:
0.Install cifs-utils:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install
cifs-utils
1.Create a folder for mounting the share on (for example /mnt/windows):
sudo mkdir [mount point]
2.Change its permissions:
sudo chown [username]:[username] [mount point]
3.Create a file containing your domain credentials (I use
/home/[user]/.smbcredentials):
username=[domain user]
password=[domain password]
domain=[domain]
4.Add the following line to /etc/fstab :
//[smb hostname]/[share name]/
[mount point] cifs
credentials=[credentials file path],rw,uid=[user],user
5.Run (only once, on reboot this will happen automagically):
sudo mount [mount point]

0


0