Install Samba (SMB Server)
Now, we need to install SAMBA server to make the HDD accessible over the network.
First we need to confirm if samba is already installed or not.
opkg list-installed | grep samba
If we don’t find any output to commands, we need to go ahead and install samba server:
listing all the available samba packages available in repositories.
opkg list | grep samba
We need packages: samba36-* for this. Installing SAMBA server:
opkg install samba36-server
(OPTIONAL) SMB Client for samba troubleshooting
opkg install samba36-client
(OPTIONAL) If you want a simple LuCi GUI config for samba
opkg install luci-app-samba
Create User for Samba
To access the storage over the network, we need to have user/s dedicated for SAMBA only, making them not able to login to system over SSH or webUI.
To do so, we will add user easiest way, by editing /etc/passwd file.
I’m adding user “attique” for this purpose with below details:
- Username: attique
- UserID: 1000 (you may need to change if there’s any other user with same ID included in Passwd file by incrementing last user’s ID with 1)
- GroupID: 65534 (Group for SAMBA users, has to be the same for all SAMBA users)
- HomeDirectory: /home/attique (No need for this to exist)
- Shell (Most Important): /bin/false (/bin/false will not allow it to login over ssh, only over samba)
So here, we need to edit /etc/passwd file and add following line in the end, you may change the values like user name/s as per your need:
Setting password for samba user we added previously, “attique”
smbpasswd -a attique
Restart the SAMBA server to update all the configurations.
service samba restart
Now, to configure the DataStore, we need to access the WebUI of the NAS. Move to Page-4 for the details.
Please go to Page 4 for the Third step: Adding DataStores