znazz75.de IT-Blog
First, install cifs-utils:
|
1 |
apt install cifs-utils |
Create a credentials file inside a secure directory. I called it “.smbcredentials” and put it inside the /root/ Folder:
|
1 2 |
username=<The login name> password=<The password> |
Edit the /etc/fstab File and add at the end:
|
1 2 3 4 5 6 7 8 9 |
//<The ip adress or dns name>/<the sharename> /<destination> cifs credentials=/root/.smbcredentials,uid=<linux user name>,gid=<linux group name>,file_mode=0664,dir_mode=0775 0 0 #Example: //192.168.0.1/data /mnt/smb/data cifs credentials=/root/.smbcredentials,uid=hans,gid=hans,file_mode=0664,dir_mode=0775 0 0 #Short Example: //192.168.0.1/data /mnt/smb/data cifs credentials=/root/.smbcredentials 0 0 |