Page 1 of 1

usershares log samba

Published: September 16, 2015 - 08:42
by sfonteneau
Hello,

I have a quick question about "usershares".

If I understand correctly, this feature allows you to define a user's home directory.

I don't use it because I declare my shares like this:

[%U]
comment = Personal directory
browseable = yes
path = /home/users/%G/%U
preexec = bash /etc/samba/bin/add_home.sh %U domain professors
read only = no.


I would therefore like to disable the usershares feature to make my Samba logs cleaner.

Indeed, in my Samba logs, I always find:

/var/lib/samba/usershares failed. No such file or directory.

This is because Samba tries to create a user folder for each person in the /var/lib/samba/usershares directory.

How can I disable this function?

Re: usershares log samba

Published: September 16, 2015 - 11:24 AM
by ssamson
Hi Simon,

Samba's usershare feature allows users to create their own share definitions.
This doesn't refer to the user's home directory.

Furthermore, it's a secondary feature.
Can you show me your smb.conf file?

Re: usershares log samba

Published: September 16, 2015 - 12:17 PM
by sfonteneau
Hi Steven and thank you

Here is my smb.conf file (It's just a file hosting service)

Code: Select all


//
                                                                                                                                                                                                                            

Re: usershares log samba

Published: September 16, 2015 - 12:19 PM
by sfonteneau
I haven't published the sub-config files.

It only contains sharing declarations.

Re: usershares log samba

Published: September 16, 2015 - 2:06 PM
by sfonteneau
The addition of

Code: Select all

usershare max shares = 0
The problem has apparently been resolved. I now have clean logs

I thought I understood that usershare max shares = 0 was the default option?

Simon

Re: usershares log samba

Published: September 16, 2015 - 2:22 PM
by ssamson
What is the output of the command?

Code: Select all

testparm |grep usershare 
Indeed, the default values ​​are:

Code: Select all

	usershare allow guests = No
	usershare max shares = 0
	usershare owner only = Yes
	usershare path = /usr/local/samba/var/locks/usershares
	usershare prefix allow list = 
	usershare prefix deny list = 
	usershare template share = 

Re: usershares log samba

Published: September 16, 2015 - 3:11 PM
by sfonteneau
Indeed, if I don't specify the usershare values,

testparm doesn't return any information about usershare.

I need to specify the default values ​​in smb.conf for them to appear.

I should also mention that I'm not using the compiled version of Samba, but the version provided by Debian 8 in the repositories.

Therefore, I'm not using the latest version; I'm on version 4.1.17.

In any case, I have clean logs now. Thank you.