2

Is there a way to completely disable usershare in Samba? Don't be confused with the users home share:

man smb.conf

Starting with Samba version 3.0.23 the capability for non-root users to add, modify, and delete their own share definitions has been added. This capability is called usershares ...

I totally don't want to use this feature and it doesn't even work, however it is still spamming my samba log, like:

[2022/09/01 11:16:05.109951,  0] ../../source3/param/loadparm.c:3445(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/test1 failed. Permission denied

What is the way to disable this checking or as a workaround how I could suppress these log lines...

redseven
  • 230
  • 1
  • 10
  • I had similar syslog entries caused by a windows client running defender on mapped network drives. I added "usershare path = " to my /etc/samba/smb.conf [global] section to prevent the log being spammed by the client. ***https://github.com/gdiepen/volume-sharer/issues/4 – Ron K. Feb 23 '23 at 23:22

1 Answers1

1

Later I've realized I have a usershare settings in my smb.conf (it was usershare allow guests = yes), what I removed, so I have none of them now and looks like that helped. Still, I don't like the way samba is doing that, as there is no clean option to turn this feature on/off.

For the record I post here the (partial) testparm output, which are the default settings and looks like the turned off state:

# testparm -v | grep usershare
...
    usershare allow guests = No
    usershare max shares = 100
    usershare owner only = Yes
    usershare path = /var/lib/samba/usershares
    usershare prefix allow list = 
    usershare prefix deny list = 
    usershare template share = 
redseven
  • 230
  • 1
  • 10