Using a GUI is nice and all but sometimes I want to know where configuration data is stored.
The Gnome file manager, Nautilus, allows Linux users to share folders on a Windows network. Users of other operating systems will find this hard to believe but before this it was difficult to do as you needed to be an administrator and edit a configuration file called /etc/samba/smb.conf (Users of other desktop managers use similar tools).
This was convenient but I wanted to know where Nautilus puts this configuration data. I searched my home directory, I looked in /etc/samba/ (just in case) and eventually found this page:
I located the config files.
It appears as though /var/lib/samba/usershares holds a text file for each share that has been created.
The usershares directory is owned by root:sambashare and the files inside are owned by the user sharing the folder, so I guess it’s a compromise between a system process (Samba) and users wanting to configure it.
Editing those files is simple, and I guess I could use “net usershare” too. I had to restart Samba too which probably wouldn’t be needed if I had use the “net” command.