united states of america usa  linkedinfacebookgoogle
Mount windows share in Linux (fstab)

Ubuntu Support and Consulting

This works on any modern distribution of Linux, but we are using Ubuntu 14.04 for the process. First, install CIFS/Samba tools, required to mount the share point:

In Ubuntu:

apt-get install cifs-utils

Now let's create the credentials file:

vim /etc/samba/credentials

Where the format is:


Because it is plain text, we want to make sure that only privileged users can access it

chmod 0600 /etc/samba/credentials

Then add a mount point to the /etc/fstab (all in one line):

//  /mnt/backup  cifs    credentials=/etc/samba/credentials,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Once done, you can mount using mount -a (or mount /mnt/backup as in example above)

Tel: (786) 646-6461   |   Toll-Free: (877) 454-0758
18350 NW 2nd Ave, Suite 406E, Miami, FL, 33169, USA
Privacy Policy