One of the projects I’ve decided to undertake in my homelab is turning my NAS server into just a dedicated NAS using TrueNAS as a base.
Why TrueNAS you may ask? At the moment, I’m running another Linux server distribution that allowed greater flexibility with some of the things I wanted to do. This server had quite a few tasks, between hosting my personal music library, my NAS, some light media, and a VM jump server. However, being powered by an N100, it would often run out of resources from multiple services overwhelming the limited capacity of this chipset, which meant that one of these tasks would always lag heavily and would intermittently become unresponsive.
So I migrated most of those tasks off to another server, with the idea being that I could use this N100-powered server exclusively for a NAS and music server. However, I ran into another issue the other week. I had set myself up with both a management account with full access to the shared directories, as well as a user profile with a more limited read-only scope for some folders, to avoid any accidental deletions of files that I regularly only need read access to.
I wanted to add a new directory to this server and give that user profile full access to modify files within this directory. Now, Samba on most distros does not seem to offer a graphical management interface, so the only option I was left with to manage this is to “raw-dog” the terminal and manually modify the following:
- Verify that my user profile even has permissions either by user or by group association, to read and write to the directory on the system level
- Verify that the samba account also has permissions and that it exists as defined
- Verify that ls -ld does indeed confirm that this configuration is immaculately defined
- Lord forbid if you ever set an ACL, you need to go back, find what this ACL was called, and ensure the permissions for this user are explicitly defined there
- Ensure the smb.conf configuration file is perfectly defined, with no typos, no errors, no conflicting statements
- Run testparm and effectively read through the output like a data forensics analyst to ensure, yet again, that there absolutely are no typos or gotchas hidden inside my configuration file
- If this still doesn’t work as intended, loop back through each of these steps and verify meticulously that there absolutely aren’t any mistakes anywhere along any of these configurations
- Run enough Parmesan through testparm to put an Italian restaurant out of business
Needless to say, something so simple, that should easily be manageable and configured through one central management console, now becomes a whole ordeal that almost makes you adverse to want to change anything with the configuration, unless you have a few hours to throw away at it.
I still find it baffling that nobody’s come up with an application that can just plug into all of this and offer a management console on your existing Linux installation.
So my answer to this? Migrate the music server over to my other server, and perform a fresh installation of TrueNAS. TrueNAS has a web management interface that I can configure while the server runs completely headless, with proper user and group management, the way things should be handled with a Samba server. Do I wish I could just implement a GUI tool without going for a fresh re-architecture of my server? You bet I do. But nevertheless, I’m excited to make this happen. I already have all of my other services migrated to my more powerful Ryzen-based server, which I have hosting a music server, media server, VM farm for testing things and learning more about system architecture and other awesome concepts in a containerized sandbox environment, and some other tasks. That server also runs in what I would call a nearly-headless state. It’s all entirely remote manageable via a remote web interface, but I do still keep a head attached for certain times when it’s just more convenient to configure services with a direct, no-latency interface.
————————————-
Post-Build Edit:
Turned out my networking hardware was too new and not supported out of the box by TrueNAS. So I needed to either find a workaround to get it connected to the network, finish provisioning TrueNAS, then try to hunt down the appropriate driver, or architect a new solution. I decided to go for the latter.
Turns out Webmin has this functionality baked in for Samba management over a secure headless Web UI. Someone actually developed exactly what I needed. Since I retained the original SSD, I tried cloning the image to my new SSD, and tried to install Webmin, but it turns out this application still doesn’t support Rocky 10. Rocky 9 and older works, but I needed a modern distro that can support my hardware out of the box. So I went with Debian 13, Webmin installed without an issue, then I just needed to create my profiles, configure the Samba share, and ensure everything was manageable in the Web UI interface.
One issue I did run into that took admittedly longer than I’d like to admit to resolve, was that my admin profile could connect to the NAS, but not my frontend user profile with read-only access to some directories.
Turned out that my smb.conf configuration file was defined to allow the admins group users to connect, but I forgot to define the standard users group.
Patched that up, verified everything worked flawlessly, and even added a fresh music server back to this, so I have both this N100 powered server and my UM790 Pro serving up music, which will also increase fault tolerance and load balancing.