Bug 445416

Summary: Dolphin keeps asking for credentials of Windows share
Product: [Applications] dolphin Reporter: Tobias G. <kde-bugzilla.oink169>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: alevkovich, kfm-devel
Priority: NOR    
Version: 21.08.3   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: modified pkgbuild

Description Tobias G. 2021-11-13 09:25:05 UTC
SUMMARY
Hey guys, 
When I'm trying to access a share created on Windows 10 that doesn't require a login, I'm not able to access it. 
Dolphin keeps asking me for credentials, but doesn't accept anything. I've tried entering the username of the Linux system, the username of windows, the PC name of the windows machine and guest. Nothing worked. 
Interestingly though, I'm able to login to a PC that is password protected, entering the credentials there works just fine. 

It's very unlikely an issue of my samba configuration, as I can use smbclient - L //IP/share to list the share (though it also asks me for a password, but it accepts anything) and mount - t cifs //IP/share /mnt/share also works fine and is then accessible via Dolphin, but this is unfortunately not a suitable solution for me. 

I'm using Manjaro and followed this guide here that created a samba config file: https://wiki.manjaro.org/index.php/Using_Samba_in_your_File_Manager

I think it's interesting to mention that this issue happens on Manjaro Linux, but not on Kubuntu. 
On Kubuntu, it also asks me for credentials (which is pretty weird), but accepts the windows pc name with any password. 
I've made sure that the systems are in the same domain. 

I've tried everything I could to rule out that it's a manjaro issue, by e.g. copying the samba config file from Kubuntu to Manjaro, with no change in behavior. The fact that I can mount the shares via cifs also makes me confident that it's an issue on the KDE side.


STEPS TO REPRODUCE
1. Boot manjaro live media or install manjaro
2. Try to access a windows share
3. See dolphin asking you for credentials over and over

OBSERVED RESULT
No credentials are accepted 

EXPECTED RESULT
It shouldn't ask me for credentials at all or accept anything 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Should any logs or config files be required, I'd be happy to provide them!
I can also create a video showing my issue
Comment 1 Alex Levkovich 2021-11-14 15:45:26 UTC
KDE's kio does not work with smbclient > 4.13.
That's the reason.
Could you please fix this?
Comment 2 Tobias G. 2021-11-14 17:27:59 UTC
(In reply to Alex Levkovich from comment #1)
> KDE's kio does not work with smbclient > 4.13.
> That's the reason.
> Could you please fix this?

Yeah, as I see, Manjaro currently provides 4.15.
How can I fix it though? 🤔
Comment 3 Tobias G. 2021-11-14 17:28:24 UTC
(In reply to Alex Levkovich from comment #1)
> KDE's kio does not work with smbclient > 4.13.
> That's the reason.
> Could you please fix this?

And thank you for your answer! :)
Comment 4 Alex Levkovich 2021-11-15 05:16:31 UTC
The one of a solution is to downgrade to samba/smbclient 4.13.5 but it is impossible because the dependences changed and the packages you could find in archive wouldn't be workable. So manual recompilation is the only possibility. But I wanted to ask Arch Linux developers how they made it. I used their PKGBUILD and had many problems. First of all waf configure didn't work with python3: it got the error about latin1 to utf8 something. And noone advice I found in the Internet helped to fix it. But I switched it to python2 and it worked. But at the end of the compilation there was a next problem: xsltproc failed with rc=6 for smb.conf.xml generating a bunch of errors. The only solution I found to rename xsltproc, reconfigure and recompile without docs. The goal of Arch Linux developers not to think about people and make the distribution stable but wow there is a new version of samba, ok we need to create a package of it. No need to check the repercussions. Probably they found this problem but decided that it is KDE developers' problem. Manjaro developers are not better then Arch Linux's ones.
Comment 5 Alex Levkovich 2021-11-15 07:43:25 UTC
ok, I get out my accusations about quality of PKGBUILD. It seems both waf and xsltproc do not like russian symbols in the path. So when I put PKGBUILD in completely english subdir it worked. So if someone needs the temporary fix: just recomple the older version.
Comment 6 Alex Levkovich 2021-11-15 08:12:34 UTC
Anyway PKGBUILD is not ok completely. 
,!ldb,!pyldb-util - prevents it from configuring.
If I remove these things then it creates the packages but with extra *db* files that already are in the system.
So anyway modification of PKGBUILD is necessary.
Comment 7 Alex Levkovich 2021-11-15 08:19:04 UTC
Created attachment 143564 [details]
modified pkgbuild
Comment 8 Tobias G. 2021-11-15 18:58:35 UTC
(In reply to Alex Levkovich from comment #5)
> ok, I get out my accusations about quality of PKGBUILD. It seems both waf
> and xsltproc do not like russian symbols in the path. So when I put PKGBUILD
> in completely english subdir it worked. So if someone needs the temporary
> fix: just recomple the older version.

Uh thank you very much for your detailed explanation and the work you put into this!
Do you know if KDE devs are working on getting KIO ready for this version / where one can track the development?

I'll test your workaround and see if it solves my issue.

BTW. Where do you know anyway that kio has issues with smbclient versions > 4.13?
Comment 9 Tobias G. 2021-11-15 23:03:46 UTC
(In reply to Alex Levkovich from comment #7)
> Created attachment 143564 [details]
> modified pkgbuild

re-building the package actually fixed the issue for me, so this really is at least a workaround, until the issue is fixed.
Comment 10 Alex Levkovich 2021-11-16 05:16:02 UTC
No one is going to fix a thing, right? I'd like to hear an answer from a responsible person.
Comment 11 Tobias G. 2021-12-19 19:31:29 UTC
I have to re-open this bug, as it stopped working for me; icu has been updated to a version not supported by samba 4.13, so I had to update samba as well.

This is still an issue.
Comment 12 Tobias G. 2021-12-19 19:32:55 UTC
(In reply to Alex Levkovich from comment #10)
> No one is going to fix a thing, right? I'd like to hear an answer from a
> responsible person.

I'm in contact with a samba dev via email, hoping that a bug report on their side will be created as it seems to be an issue in libsmb
Comment 13 Tobias G. 2021-12-30 12:02:22 UTC
(In reply to Alex Levkovich from comment #10)
> No one is going to fix a thing, right? I'd like to hear an answer from a
> responsible person.

Hey there,

good news!
I managed to open a bug report here: https://bugzilla.samba.org/show_bug.cgi?id=14935

And there's a commit merged into master already that fixes the issue, the shares are accessible again! :)
We have to wait until samba 4.16 though or build from master.