Samba configuration

Hi,

I have an usb-stick with label "S2" that I share via samba.

The stick gets mounted to /home/mh/S2, I have this stanza in /etc/config/fstab:

config mount
option target '/home/mh/S2'
option uuid '3CD7-10D9'
option enabled '1'

In /etc/config/samba I put this stanza:

config sambashare
option name 'S2'
option path '/home/mh/S2'
option read_only 'no'
option guest_ok 'yes'

And it works, but whenever I reboot another stanza is added to /etc/config/samba:

config sambashare
option path '/mnt/sda1'
option name 'sda1'
option read_only 'yes'
option guest_ok 'yes'

And I would like to understand where this is coming from?

So could you please explain to me how this stanza gets created on boot and if it is possible to suppress it.

Many thanks!

You seem to use samba36 and have the 'samba36-hotplug' package also installed? If so just uninstall it.
If not post your /etc/config/samba.config.

1 Like

samba36-hotplug is not installed and /etc/config/samba.config does not exist.

Here is my /etc/config/samba (should you mean that):

config samba
option workgroup 'WORKGROUP'
option homes '1'
option name 'GL-AR300M'
option description 'GL-AR300M-e16'

config sambashare
option name 'stuff'
option path '/home/mh/stuff'
option read_only 'no'
option guest_ok 'yes'

config sambashare
option name 'S2'
option path '/home/mh/S2'
option read_only 'no'
option guest_ok 'yes'

config sambashare
option path '/mnt/sda1'
option name 'sda1'
option read_only 'yes'
option guest_ok 'yes'

So if you delete this, it comes back after boot?

Yes the last stanza comes back even if I delete it.
This is my question.

I get an automatically generated mount point at /dev/sda1 too when i connect a drive, but deleting it through Luci>System>Mount Points>Mount Points always removes it permanently, so you might try removing it that way if you haven't already (edit - meaning remove it through luci>services>network shares>shared directories), maybe there's a bug that only allows removal through Luci.