Mount SMB on Ubuntu® on boot

1970 + 1685737415

Install SMB/CIFS

sudo apt install cifs-utils
sudo mkdir /media/SharedFolder
sudo nano /etc/fstab

Inside fstab paste this line and modify the IP address, folder path, user name as localusername, user credential path:

//10.0.0.1/Share/Folder /media/SharedFolder cifs rw,_netdev,users,uid=localusername,credentials=/home/localusername/.smbcredentials 0 0

Make file for user details

nano ~/.smbcredentials

Type in your network share's credentials by replacing networkusername and networkuserpassword:

username=networkusername
password=networkuserpassword

Make your credentials accessible by current user only

chmod 600 ~/.smbcredentials

More posts