Ned, I would love to stand here and talk with you—but I’m not going to, Phil Connors, Groundhog Day.
When you have eliminated the impossible, whatever remains, however improbable, must be the truth, Sherlock Holmes
Samba is an open-source software suite that enables file and print sharing between computers running Windows and those running Unix or Linux. It implements the SMB (Server Message Block) protocol, which is used for network file sharing.
We are going to configure an SMB share on the same dataset Virtualizing TrueNAS SCALE on Proxmox: Setup with ZFS & NFS so Windows or any SMB clients can access it.
Unlike NFS, SMB will require user authentication by default. TrueNAS does not allow SMB sharing as the root user or other built-in accounts, so we need a regular user. We have already created an admin for the Web UI (truenas_admin), but it’s highly recommended to create a separate user for file sharing.
In TrueNAS web UI, go to Credentials, Users, click the Add button. Enter a username (e.g., nmaximo7) and a password.
For Primary Group, TrueNAS will create a group with the same name by default. It’s not a problem because all new users belong to the group builtin_users which should have SMB capability by default. Make sure that SMB User is checked and set its Home directory to your dataset, e.g., /mnt/mynaspool/data
.
Now, adjust dataset permissions to give this user access. In the TrueNAS Web UI, navigate back to Datasets, find your recently created dataset (mynaspools, data), and Edit Permissions. Set the owner user and group to our user (e.g., “nmaximo7” in this example), make sure that the flags Apply User/Group are checked to update ownership, and Access Mode to 755, so that the dataset is already prepare for the user.
nmaximo7
, we’ll use authenticated access.We can see that our SMB share is created and listed under Windows (SMB) Shares and the SMB service is running.
On a Windows machine (Windows 10/11, etc.) in the same network, open File explorer and type in the address bar \\< TrueNAS-IP > (e,g., \\192.168.1.42) and press Enter.
This should contact the TrueNAS server and prompt for credentials. Enter the TrueNAS nmaximo7
credentials. Then, you should see the shared folder (the name of the SMB share).
Alternatively, you can use the Map Network Drive feature to assign it a drive letter for easy and convenient access.
Open File Explorer from the taskbar. Select This PC from the left pane. Then, on the File Explorer ribbon (···), select More, Map network drive.
In the Drive list, select a drive letter (Any available letter will work just fine).
In the Folder box, type the path to the share, e.g. \\192.168.1.42\data (replace with your NAS IP and share name). To connect every time you sign in (persistent) to your PC, select Reconnect at sign-in
, and Connect using differential credentials
if your Windows login is no the same as the NAS user. Then, select Finish.
GNU/Linux can also access SMB shares. On a Linux client, install CFIS utils and mont the SMB base share on a Linux mount point.
mkdir /mnt/samba
# GNU/Linux system can access SMS shares using the CFIS protocol.
# To do this, ensure that the CIFS utilities are installed on your client system
# You can mount a Samba share from a TrueNas server by executing the following command:
~ sudo mount -t cifs -o username=username,password=password //192.168.1.42/data /mnt/samba
# Replace username and password with your real credentials and adjust the IP addRTL812ress and share path as needed.