I have a local server running Ubuntu 18.04.1 which was recently upgraded from Ubuntu 15 where I had a few shares configured manually via Samba in /etc/samba/smb.conf
like:
[myshare]
path = /home/user
writeable = yes
valid users = root, user
This has continued to work just fine since the upgrade but today I noticed if I right-click on a directory in Gnome I get a dialog window with a tab called "Local Network Share" that looks like this:
I enabled it and now it's showing up on my LAN as another share. My question is, where is this configured? Is it using Samba as well or some other service? I took a look at smb.conf
where the other shares are configured but its not there.
** "Local Network Share" is the gnome implementation ( nautilus-share ) of a Samba Usershare. Its intent was to allow an ordinary user the ability to share a directory he owned.
** A Samba Usershare and for want of a better name a Samba Classic Share both create Samba share definitions but as indicated above those definitions reside in different files. Usershare: /var/lib/samba/usershares vs ClassicShare: /etc/samba/smb.conf.
** Samba will read both and that can be a problem if both are used to define the share of the same directory because they might be defined differently as is the case here. Your guess is as good as mine which one Samba will obey.
** You cannot in this case reproduce through Nautilus the share definition you have in smb.conf because nautilus-share does not have that option: There is no "valid users" option in nautilus-share - it's either guest access or anyone with samba credentials. You cannot specify a list of users or groups.
** A Samba Classic Share offers many other options not available to Usershares so it depends on how complex your requirements are for these shares.