Mount samba folder

Install cifs-utils

sudo apt install cifs-utils

Create a mount folder point.

sudo mkdir /shared-folder

Mount the samba folder manually.

sudo mount -t cifs -o username=user //192.168.0.2/shared-volume /shared-volume/

Mount samba folder via fstab

Create a file with credentials named “~/.smbcredentials” and make sure you secure it:

chmod 0600 ~/.smbcredentials
# ~/.smbcredentials
username=user
password=password
domain=WORKGROUP

Edit “/etc/fstab” file and add your entry.

//192.168.0.2/shared-volume /shared-volume/ cifs credentials=/home/user/.smbcredentials,uid=user,gid=WORKGROUP 0 0

Finally, test the mount with:

sudo mount -a

Leave a Comment

Scroll to Top