Mount Drive

Ubuntu 20.04 mounting a drive using a credential file

–create mount point

cd /media
sudo mkdir 'mount point name'

–edit fstab

sudo nano ~/etc/fstab

–add line – noauto is used to mount at login, delete to mount at boot

//server/share /media/'mount point name' cifs credentials=/home/username/.smbcredentials,user,noauto,iocharset=utf8, 0 0

–install cifs helper program

sudo apt install cifs-utils

–create credential file

sudo nano ~/.smbcredentials

–change user and password to your credentials of choice

user=yourusername
password=yourpassword

–mount drive

sudo mount -a

Leave a Reply