| |||||||||
| ||||||||||||||
Author: Engys | Topic: Mounting Samba smb/cifs share | Last change: 2013-10-25 15:49:02 | ||||||||||||
To be able to mount a smb/cifs share you need to install cifs-utils: apt-get install cifs-utils
To manually mount a smb/cifs share you can use the following as root:
mount -t cifs //<ip>/share /mnt/share -o user=<username>
<ip> need to be replaced with your smb server ip. <username> need to be replaced with the smb username. if you want to mount a smb/cifs share automatically you can edit your /etc/fstab with: vi /etc/fstab
and add the following line:
//<ip>/share /mnt/share cifs rw,credentials=/etc/smb-pass.txt,comment=systemd.automount,uid=<uid>,gid=<gid> 0 0
<ip> need to be replaced with your smb server ip. <uid> and <gid> need to be replaced with the user- and groupid of the user who is the owner of the underlying filesystem. comment=systemd.automount will speed up the boot process and is mounting the share if it is needed. create a file in /etc with:
vi /etc/smb-pass.txt
and add the following lines:
username=<yourname>
password=<yourpass> protect it against others with:
chmod 700 /etc/smb-pass.txt | ||||||||||||||
![]() | ![]() |
|