Managing SMB/CIFS in Houston UI
This article will cover creating and managing SMB/CIFS shares in the Houston UI
- 45 Drives Storinator with a configured storage array
- Houston UI installed and accessible via a web browser [SER.VER.I.P:9090]
- ZFS Cockpit Dependencies installed
- A user with Samba permissions
- In the Houston UI, navigate to the “ZFS” tab. To move forward with creating some Samba shares, the pool will need to already be configured. For this example, we have a pool named “test.” Click the “Create Filesystem” button.
- This will open up a setup wizard. Select the parent filesystem– if you have multiple pools configured then you will have multiple options to choose from, otherwise, this option will default to your main storage pool. Give the filesystem a name and click “Enable Samba Share“.
- The filesystem should be created and listed under your Storage Pools.
- Once your filesystem is created you will have to open the firewall port for your Samba share. To do so, go to your “Networking” tab on your Houston UI and click “Edit Rules and Zones”.
- Once in your firewall settings, click “Add Services“. Under “Filter Services” enter “Samba” and toggle the one which applies to you. In this case, we will be selecting “Samba” and then clicking “Add Service“.
- We’ll now be adding a user through the Houston UI and give it Samba permissions so it can access the share. Under the “Accounts” tab, select “Create New Account“.
- Give the account a full name if warranted, then a username and a password. Do not set the Samba password to “password”, as it can sometimes cause issue because of the dictionary check.
- You will now see your new user created.
- From here, we’ll need to give the account a Samba password. Navigate to the “Terminal.“ Enter the following command with the proper username: “smbpasswd -a [username]” Then fill in the password you’d like to use for Samba access on this account.
- We’ll need to ensure the user has ownership or is within the group which owns the share filesystem. We can change this through the terminal as well. Here, we see root is the owner user and owner group.
- Now we’ll be changing that with “chown [username]:[group] /[pool]/[Samba Share]”
- While we’re here, we should also set the permissions to allow for read/write, using “chmod 775 /[pool]/[Share Name]”
- On a Windows client, go to “This PC” in File Explorer.
- Select “Map network drive“
- In this menu, enter the server IP address in the following format “\\SER.VER.I.P\[SHARE-NAME]” and select “Connect using different credentials“.
- Enter the Samba user credentials we created in the previous step.
- After entering the credentials, the directory should automatically open and be visible as a mapped drive under “This PC”.
Verification (Mac OS X):
- At the toolbar on the top of the screen, press Go and then Connect to Server.
- In the address bar, enter
smb://XXX.XXX.XXX.XXX/SHARE_NAMEand click Connect.
- Enter the username and password of the samba user you created earlier. You should now be able to access the server through the side bar.
- Place files and folders into the “samba” folder.
- “Access denied” upon entering credentials
– Ensure Linux firewall has an exception for Samba
– Check to ensure the user being used to map the share is in the right ownership group or is the owner user of the share directory.
- Unable to find server when trying to map network drive
– Make sure the Storinator has a Gateway Server IP, and in some events you may need a DNS Server IP as well.
– Check VLAN settings if the Storinator is on a separate subnet
– If making use of bonded interfaces, ensure they’re configured on the switch. These need to configured on both the switch side and the Storinator side.
- Unable to read and/or write
– Check the permissions of the share with ls -al in the terminal. It should be set to chmod 775 to avoid any conflict.
- Ubuntu Double Samba Share Folders Issue
– When using a client system to connect to the samba share on Ubuntu, there is an issue with two directories being listed. To fix this issue follow the commands below:
– Change usershare allow guests = yes to usershare allow guests = no, then add:
usershare path = /var/lib/samba/usershares2
– Save the changes then in the terminal run the commands:
mkdir /var/lib/samba/usershares2 systemctl restart smbd