14. maj 2015|Linux, Notater|

Mount cifs share in fstab

Install cifs-utils (even if you already have Samba and related packages installed):

sudo pacman install cifs-utils

Edit /etc/fstab and add your entry:

//server/share /pathto/mountpoint cifs credentials=/etc/samba/.smbcredentials 0 0

Create the .smbcredentials file in /etc/samba:

$ sudo touch /etc/samba/.smbcredentials
$ sudo nano /etc/samba/.smbcredentials


Make sure you secure your /etc/samba/.smbcredentials file:

sudo chmod 0400 /etc/samba/.smbcredentials

Finally, test the mount with:

sudo mount -a
Share this Post: