[Samba] Weird usershares attempted use
Rowland Penny
rpenny at samba.org
Mon Feb 17 09:08:13 UTC 2025
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
More information about the samba
mailing list