Mouting SMB volumes on Windows and Debian
TrueNAS
Go to Datasets
and add new Dataset. Go to Shares
tab and under Windows (SMB) Shares
press Add
button and name new share to be created. Confirm and enjoy your new share.
Windows
Open file explorer and go to This PC
. At the top bar select Map network drive
. Select letter of your choice for the new drive. Inside Folder
text block type \\192.168.XXX.XXX\[YOUR_SHARE_NAME]
. Make sure to tick the Reconnect at sign-in
and Connect using different credentials
checkboxes. Then click Finish
. You will now see a prompt asking for a user name and password. Tick the Remember my credentials
checkbox.
Debian
Create a credentials file somewhere in the system, in my case it’s /root/smbcredentials
. The content of this file should look like this:
user=[INSERT_USERNAME]
password=[INSERT_PASSWORD]
Open /etc/fstab
file and add new line at the end that should look like this:
//192.168.XXX.XXX/[YOUR_SHARE_NAME] /mnt/[YOUR_SHARE_NAME] cifs credentials=/root/smbcredentials,uid=1000,gid=1000,noauto,x-systemd.automount 0 0
Reboot the OS and the volume should be mounted at the specified location.