[Pkg-samba-maint] Bug#776223: missing documentation of Debian "usershare max shares" customization

Nathan Stratton Treadway debbugs2015 at nathanst.com
Sun Jan 25 16:56:34 UTC 2015


Package: samba
Version: 2:4.1.6+dfsg-1

I was recently setting up Samba on a file server system running Ubuntu
Trusty, and as I was testing out my configuration I was surprised to find
error messages similar to
  process_usershare_file: stat of /var/lib/samba/usershares/test failed. No such file or directory
in my Samba logs, since I had not intended to have usershares enabled on
that system.

I looked closely at my smb.conf file and confirmed that I did not have
any active "usershare max shares" line -- and saw that both the comments
in smb.conf itself and the smb.conf man page stated the default setting
for that parameter was "0", which should have meant the usershare
function was disabled.

After further digging, I discovered that usershares are enabled because
of the Debian-specific patch file (usershare.patch), which changes the
compiled-in default values of "max shares" to be 100 instead of 0.

(This patch which was applied as part of bug #443230,
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=443230
)

That patch does update the net.8 man page's USERSHARE section to reflect
the new behavior, but that information does not seem to be mentioned
anywhere in the smb.conf.5 man page or the distributed smb.conf file.

(The Trusty versions of the samba packages are derived from Debian's
2:4.1.6+dfsg-1 package, so I am using that version number for this bug
report.  I manually checked the samba package in the anonscm.debian.org
git repo, and both the patch and smb.conf appear to be unchanged
since then.)

						Nathan



More information about the Pkg-samba-maint mailing list