[Samba] Strange logs since upgrade to samba 4.14.0

Peter Eriksson pen at lysator.liu.se
Sat Mar 13 12:48:19 UTC 2021


Heh, I was just about to post about the same thing. Some testing indicates that an easy wait to trigger that message is to try to “cd” from smbclient down into a directory you don’t have access to.

(I see a lot of those messages filling up the log files, hopefully it’ll be disabled or moved to a lower log level in future releases. I’ll disable it locally for now)

Another thing I’ve added a local patch for is to add the remote IP address to the log messages when users are denied access to shares. Previosly seeing “guest user (from session setup) not permitted access to this share (foo)” without any indication from where they were coming wasn’t really helpful...

--- samba-4.14.0/source3/smbd/service.c 2021-01-21 14:20:40.000000000 +0100
+++ samba-4.14.0-liu/source3/smbd/service.c     2021-03-11 09:46:44.480926000 +0100
@@ -353,7 +353,10 @@
                if (!lp_guest_ok(snum)) {
                        DBG_WARNING("guest user (from session setup) "
                                  "not permitted to access this share "
-                                 "(%s)\n", lp_const_servicename(snum));
+                                 "(%s) [from %s]\n",
+                                   lp_const_servicename(snum),
+                                   tsocket_address_string(sconn->remote_address, talloc_tos())
+                                   );
                        return NT_STATUS_ACCESS_DENIED;
                }
        } else {
@@ -362,9 +365,11 @@
                                   session_info->security_token, snum)) {
                        DBG_WARNING("user '%s' (from session setup) not "
                                  "permitted to access this share "
-                                 "(%s)\n",
+                                 "(%s) [from %s]\n",
                                  session_info->unix_info->unix_name,
-                                 lp_const_servicename(snum));
+                                 lp_const_servicename(snum),
+                                 tsocket_address_string(sconn->remote_address, talloc_tos())
+                                 );
                        return NT_STATUS_ACCESS_DENIED;
                }
        }

- Peter



> On 13 Mar 2021, at 12:18, Roy Eastwood via samba <samba at lists.samba.org> wrote:
> 
> I have a Debian Buster member server which I upgraded to version 4.14.0 and since then I have been getting several log messages like
> this one in syslog:
> 
> Mar 13 10:33:34 lxd-m1 smbd[1406]:   filename_convert_internal: open_pathref_fsp [roy] failed: NT_STATUS_ACCESS_DENIED
> 
> I don't notice any ill effects, just the above log messages.   Any clues as to what can be causing them?
> 
> Regards,
> 
> Roy
> 
> 
> -- 
> 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