Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#926474: smbclient: Can browse samba shares as root but not as user

403 views
Skip to first unread message

gcab...@libero.it

unread,
Apr 5, 2019, 2:30:03 PM4/5/19
to

Package: smbclient
Version: 2:4.9.5+dfsg-2
Severity: important

Dear Maintainer,

         in a freshly installed testing/buster release, I installed samba + smbclient and reproduced the same configuration
 (smb.conf, smbpasswd for root and for user) that is perfectly working on a Stretch release installed in a separated partition .
Testparm gives a positive result, and  # pdbedit -w -L correctly provides
root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:564A9466B5B97FEBE398359543B5B07D:[U          ]:LCT-5CA4C2F8:
giuliano:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:8C869E0D14E71B60877E785FE5F8A299:[U          ]:LCT-5CA4C312:

Issuing the command smbtree as root I can see the available local and remote resources, however issuing the same command
 as user I get
"Unable to initialize messaging context" on the first line,
followed either by nothing, or by an incorrect or partial list of the shares.
Restarting samba (# /usr/sbin/service smbd restart) then smbtree shows all the shares, always with the same message on first
line, but I cannot browse them:
Dolphin does not show anything under Samba Shares.

I have quite a limited experience and do not know which other details might be of interest.

Thanks for your attention and work
Giuliano Cabrele




-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-4-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=C.UTF-8 (charmap=locale: Cannot set LC_ALL to default locale: No such file or directory
UTF-8), LANGUAGE=en_US (charmap=locale: Cannot set LC_ALL to default locale: No such file or directory
UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages smbclient depends on:
ii  dpkg          1.19.6
ii  libarchive13  3.3.3-4
ii  libbsd0       0.9.1-2
ii  libc6         2.28-8
ii  libpopt0      1.16-12
ii  libreadline7  7.0-5
ii  libsmbclient  2:4.9.5+dfsg-2
ii  libtalloc2    2.1.14-2
ii  libtevent0    0.9.37-1
ii  samba-common  2:4.9.5+dfsg-2
ii  samba-libs    2:4.9.5+dfsg-2

smbclient recommends no packages.

Versions of packages smbclient suggests:
ii  cifs-utils       2:6.8-2
pn  heimdal-clients  <none>

-- debconf information:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_TIME = "it_IT.UTF-8",
    LC_MONETARY = "it_IT.UTF-8",
    LC_CTYPE = "C.UTF-8",
    LC_MEASUREMENT = "it_IT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory

Mathieu Parent

unread,
Apr 5, 2019, 3:50:02 PM4/5/19
to
Control: tag -1 + moreinfo

Le ven. 5 avr. 2019 à 20:27, <gcab...@libero.it> a écrit :
>
> Package: smbclient
> Version: 2:4.9.5+dfsg-2
> Severity: important
>
> Dear Maintainer,

Hi,

> in a freshly installed testing/buster release, I installed samba + smbclient and reproduced the same configuration
> (smb.conf, smbpasswd for root and for user) that is perfectly working on a Stretch release installed in a separated partition .
> Testparm gives a positive result, and # pdbedit -w -L correctly provides
> root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:564A9466B5B97FEBE398359543B5B07D:[U ]:LCT-5CA4C2F8:
> giuliano:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:8C869E0D14E71B60877E785FE5F8A299:[U ]:LCT-5CA4C312:
>
> Issuing the command smbtree as root I can see the available local and remote resources, however issuing the same command
> as user I get
> "Unable to initialize messaging context" on the first line,
> followed either by nothing, or by an incorrect or partial list of the shares.
> Restarting samba (# /usr/sbin/service smbd restart) then smbtree shows all the shares, always with the same message on first
> line, but I cannot browse them:
> Dolphin does not show anything under Samba Shares.
>
> I have quite a limited experience and do not know which other details might be of interest.

Please provide your smb.conf.

Regards
--
Mathieu Parent

Mathieu Parent

unread,
Apr 6, 2019, 4:10:03 PM4/6/19
to
Le sam. 6 avr. 2019 à 16:00, <gcab...@libero.it> a écrit :
>
> Hi, Mathieu, thanks for your reply.
>
> I tried either with the new smb.conf (att. smb.conf.up1) suggested during installing samba, and with the version taken from previous releases and which is working flawlessly in Stretch (att. smb.conf.ucf-old). Does not change the problem.

Is Winbind installed? Are you using pam_winbind and nss_winbind? What
is your complete command?

Regards

--
Mathieu Parent

gcab...@libero.it

unread,
Apr 6, 2019, 8:10:02 PM4/6/19
to
a) no, winbind is not installed (and is not installed under Stretch 9.8, where the samba connection is working perfectly).
b) for the moment, I just set up a point-to-point ethernet cable connection with an old pc running winxp, within the same workgroup, and I just use the file \etc\hosts to map the addresses (pinging is ok both ways).
c) don't get what you mean by command; I use smbtree to check that the shares on both pc's are visible, after that (normally) I can browse through a file manager, and in fact I can do that through Krusader running with root privileges.

Mathieu Parent

unread,
Apr 7, 2019, 2:50:03 AM4/7/19
to


Le dimanche 7 avril 2019, <gcab...@libero.it> a écrit :
> a) no, winbind is not installed (and is not installed under Stretch 9.8, where the samba connection is working perfectly).

Can you try wih winbind installed (and all samba services restarted)?


> b) for the moment, I just set up a point-to-point ethernet cable connection with an old pc running winxp, within the same workgroup, and I just use the file \etc\hosts to map the addresses (pinging is ok both ways).
> c) don't get what you mean by command; I use smbtree to check that the shares on both pc's are visible, after that (normally) I can browse through a file manager, and in fact I can do that through Krusader running with root privileges.
>
>
>
>> Il 6 aprile 2019 alle 21.58 Mathieu Parent <math....@gmail.com> ha scritto:
>>
>>
>> Le sam. 6 avr. 2019 à 16:00, <gcab...@libero.it> a écrit :
>> >
>> > Hi, Mathieu, thanks for your reply.
>> >
>> > I tried either with the new smb.conf (att. smb.conf.up1)  suggested during installing samba, and with the version taken from previous releases and which is working flawlessly in Stretch (att. smb.conf.ucf-old). Does not change the problem.
>>
>> Is Winbind installed? Are you using pam_winbind and nss_winbind? What
>> is your complete command?
>>
>> Regards
>>
>> --
>> Mathieu Parent
>
>

--
Mathieu

gcab...@libero.it

unread,
Apr 8, 2019, 11:50:03 AM4/8/19
to


Installed winbind (and then also iibpam-winbind, iibnss-winbind) : no change on smbtree output command.

The warning about "messaging context" is always there in the first line, followed either by nothing, or by only the remote (win xp) shares, or by the complete list of shares. The behaviour is quite random and could not grasp under which conditions I get one or the other situation. Once the complete list has appeared after a long time (some 5 -10 min.). When the local (buster) shares are not shown, I cannot browse them from win xp, otherwise I can do that flawlessly.

However,  now I realized an unexpected outcome

1) running Dolphin as user, opening /Network/Shared Folders (SMB) I get an empty window

2) addressing Dolphin to open smb://casa(=workgroup) I get the error warning

"Internal Error

Please send a full bug report at http://bugs.kde.org

Unknown error condition in stat: File exists"


or instead, going to smb://(user)@(workgroup), i get

"Internal Error

Please send a full bug report at http://bugs.kde.org

libsmbclient reported an error, but did not specify what the problem is. This might indicate a severe problem with your network - but also might indicate a problem with libsmbclient.

If you want to help us, please provide a tcpdump of the network interface while you try to browse (be aware that it might contain private data, so do not post it if you are unsure about that - you can send it privately to the developers if they ask for it)"


3) but if I address Dolphin to directly go to smb://(remote host) or smb://(user)@(remote host) then - after being requested and giving  the password - I CAN ACCESS the remote shares, and, as far as I could see, I can fully operate r/w as allowed in smb.conf.

Same for the local shares.

Even more surprisingly (it seems that) I can access local and remote shares INDEPENDENTLY from whether smbtree lists  them or not.


Given the invitation above to submit a tcpdump report, I installed wireshark and took a dump for each of the cases above, together with a snapshot of Dolphin in/out put, and I am available to submit them privately if of interest.


Finally, allow me to ask what "messaging context" is? which process is supposed to activate that?

Thanks for attention and kind regards

L. van Belle

unread,
Apr 10, 2019, 3:40:04 AM4/10/19
to
Hai,
 
Based on what i see here :
 
1) running Dolphin as user, opening /Network/Shared Folders (SMB) I get an empty window
For this I suggest first try this setting on the debian server in smb.conf
 
client max protocol = NT1
 
if that works also try, keep the highest that works.
client max protocol = SMB2
 
 
2) addressing Dolphin to open smb://casa(=workgroup) I get the error warning
Report this also @Dolhin/KDE  the network browser part is probley still at SMB1, while samba 4.9.5 defaults to SMB3
 
3) but if I address Dolphin to directly go to smb://(remote host) or smb://(user)@(remote host) then - after being requested and giving the password - I CAN ACCESS the remote shares, and, as far as I could see, I can fully operate r/w as allowed in smb.conf.
 
 
 
Greetz,
 
Louis
 
0 new messages