1. Login
  2. Select Advanced Settings
  3. Select File Sharing >> Users
  4. Select Create User
    1. Write Username: sysops
    2. User ID: 1500
    3. Select your email
    4. Select your password
  5. Select Folder Setup
    1. Create Folder
    2. Name: backup
    3. Select SMB and BACKUP
    4. Put user sysops with W/R permissions
  6. On File sharing tab, activate SMB and select Switch between SMB2 and SMB1 automatically and SMB Signing as [Auto]

Note: DNS, hosts and basic NAS configuration is not covered on this tutorial.

On Debian 12 box

Install cifs-utils

First, make sure you have cifs-utils installed. If not, install it using the following command:

sudo apt-get install cifs-utils

Create smbcredentials file

Create a file named /etc/smbcredentials with the following content:

sudo nano /etc/smbcredentials

Add the following lines:

username=sysops
password=yourselectedpassword

Save the file and exit the text editor.

Set proper permissions to smbcredentials file

It’s important to restrict access to the credentials file to maintain security.

Run the following command:

sudo chmod 600 /etc/smbcredentials

Create mount point

Create a directory where you want to mount the SMB share. In this tutorial, we’ll use /backup:

sudo mkdir /backup

Mount the SMB share

Use the mount command to mount the SMB share to /backup:

sudo mount -t cifs -o
vers=2.0,credentials=/etc/smbcredentials,uid=1000,gid=100,file_mode=0664,dir_mode=0775
//192.168.1.4/backup /backup/

-t cifs: Specifies the file system type.

-o vers=2.0,credentials=/etc/smbcredentials: Options for the mount command. vers=2.0 specifies the SMB version to use, and credentials=/etc/smbcredentials specifies the path to the credentials file.

//192.168.1.4/backup: The address of the SMB share you want to mount.

/backup/: The directory where you want to mount the SMB share.

Verify the mount

You can verify that the mount was successful by checking if the share is accessible in the /backup directory:

ls /backup

If the command returns a list of files and directories from the SMB share, then the mount was successful.

Automatically mount on boot (optional): If you want the SMB share to be mounted automatically every time the system boots, you can add an entry to the /etc/fstab file.

Open the file in a text editor:

sudo nano /etc/fstab

Add the following line at the end:

//192.168.1.4/backup /backup cifs vers=2.0,credentials=/etc/smbcredentials,uid=1000,gid=100,file_mode=0664,dir_mode=0775 0 0

Save the file and exit the text editor.

Now, whenever you reboot your Debian 12 system, the SMB share will be automatically mounted at /backup using the specified credentials.