[Samba] Weird usershares attempted use
Stephen Brandli
steve at brandli.com
Mon Feb 17 19:02:11 UTC 2025
Okay, I added that and the errors stopped. I was hoping that this was a symptom of my bigger problems, but it wasn't.
Steve
-----Original Message-----
From: samba <samba-bounces at lists.samba.org> On Behalf Of Rowland Penny via samba
Sent: Monday, February 17, 2025 1:08 AM
To: samba at lists.samba.org
Cc: Rowland Penny <rpenny at samba.org>
Subject: Re: [Samba] Weird usershares attempted use
On Mon, 17 Feb 2025 03:14:46 +0000
Stephen Brandli via samba <samba at lists.samba.org> wrote:
> Another issue I don't understand:
>
> On two different samba servers, smbd logs errors like this:
>
> Feb 16 18:36:29 roberts smbd[136]: process_usershare_file: stat of
> /var/lib/samba/usershares/business failed. Permission denied
>
> Neither machine have configured usershares. There are no users on the
> sambashare group. The server logging the above error is replacing a
> file server that had a share called "business." However, the smb.conf
> file for the new server does not presently include that share. (But
> the client I was testing with has that share pinned.) The other server
> is logging permutations of the word "personal" as if the client
> machine is sending messages to the file server as the user types in
> the word "personal," the name of a valid share on that server.
>
> Should these file servers be attempting to write to usershares under
> these circumstances?
>
> Steve
>
>
I think this might be another of those diagnostic that Douglas is looking for, it is coming from source3/param/loadparam.c
'process_usershare_file':
/* Minimize the race condition by doing an lstat before we
open and fstat. Ensure this isn't a symlink link. */
if (sys_lstat(fname, &lsbuf, false) != 0) {
if (errno == ENOENT) {
/* Unknown share requested. Just ignore. */
goto out;
}
/* Only log messages for meaningful problems. */
DEBUG(0,("process_usershare_file: stat of %s failed. %s\n",
fname, strerror(errno) ));
goto out;
}
Your client is 'asking' about the usershare and the server is trying to get information, but it doesn't exist so it returns 'denied' instead of 'does not exist'
Either stop the client asking for the share, create the usershare or add 'usershare max shares = 0' to the servers smb.conf file.
Rowland
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
More information about the samba
mailing list