[Samba] smbclient (Samba 4.9.4) "Unable to initialize messaging context"?

Peter Eriksson peter at ifm.liu.se
Fri Dec 21 15:47:31 UTC 2018



> On 21 Dec 2018, at 09:54, David C. Rankin via samba <samba at lists.samba.org> wrote:
> 
> Sambadevs,
> 
>  I don't know if this is a bug or just a spurious error message when using
> smbclient (on a standalone config), but checking smbclient, I get:
> 
> 02:47 2pi:~> smbclient -U% -Llocalhost
> Unable to initialize messaging context
> 
>        Sharename       Type      Comment
>        ---------       ----      -------
>        samba           Disk      2pi - Law
>        IPC$            IPC       IPC Service (2pi Samba 4.9.4)
> Reconnecting with SMB1 for workgroup listing.
> 
>        Server               Comment
>        ---------            -------
> 
>        Workgroup            Master
>        ---------            -------
>        RLFPLLC
> 
> What is "Unable to initialize messaging context"?
> 
> I see a patch back in July, related to "Fix bug 13465",
> https://lists.samba.org/archive/samba-technical/2018-July/129186.html but it
> is unclear why the message is still being issued?

Because that patch for bug 13465 fixes a similar error message in another part of the code…

(Notice that the error message does not end in a “.” or a “!” which the other patch fixes :-)

I just added the below patch to my own-compiled 4.9.4 tree :-)

--- popt_common_cmdline.c.ORIG  2018-11-08 08:58:08.000000000 +0100
+++ popt_common_cmdline.c       2018-12-21 14:08:04.660504000 +0100
@@ -106,7 +106,7 @@
                bool ok;
 
                msg_ctx = cmdline_messaging_context(get_dyn_CONFIGFILE());
-               if (msg_ctx == NULL) {
+               if (msg_ctx == NULL && geteuid() == 0) {
                        fprintf(stderr, "Unable to initialize "
                                "messaging context\n");
                }

- Peter




More information about the samba mailing list