schwarzimnetz.de

Kreative Ideen, Traktoren, Motorräder und Themen zu Software

Ubuntu 16.04 – auto mount smb share


Create a file where your smb credentials are stored. e.g.n

touch /etc/samba/usernsudo gedit /etc/samba/user

nEnter your credentials like this:n

username=samba_usernpassword=samba_user_password

ncreate the directory where you want your smb share should be mountedn

sudo mkdir /media/smb_share

nedit your fstab to auto-mount your smb sharen

sudo gedit /etc/fstab

nadd a line like this:n

//myserver_ip_address/folderToShare/  /media/smb_share/  cifs  credentials=/etc/samba/user,noexec  0 0

nUnfortunately the mount will fail, you have to install cifs-utilsn

sudo apt-get install cifs-utils

nAfter that you can try the following command which should mount your smb share. If you don’t install cifs-utils, this command should fail.n

sudo mount /media/smb_share

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert