Bug 398079 - accessing passwordless Windows SMB shares requires authentification
Summary: accessing passwordless Windows SMB shares requires authentification
Status: RESOLVED UPSTREAM
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Samba (show other bugs)
Version: 18.08.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://bugzilla.samba.org/show_bug.c...
Keywords:
: 371952 419992 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-08-30 20:41 UTC by tempel.julian
Modified: 2020-09-30 17:19 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
password dialog with 'Remember password" checkbox (28.28 KB, image/png)
2020-03-11 19:42 UTC, Patrick Silva
Details
screen recording, Windows 7 client does not ask for password to open passwordless share from Windows 7 server (655.10 KB, video/mp4)
2020-03-11 20:09 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tempel.julian 2018-08-30 20:41:29 UTC
Access a Windows network share which doesn't require authentication with any KIO using program like Dolphin.
Unlike when accessing a passwordless Linux Samba server share, KIO still asks for authentication. Entering "*" both as username and password works, but this should happen automatically and silently in background (It's that way with gvfs.).
Comment 1 Patrick Silva 2018-09-17 00:20:24 UTC
*** Bug 371952 has been marked as a duplicate of this bug. ***
Comment 2 Harald Sitter 2020-02-11 13:45:48 UTC
Given a new windows10 installation please provide a step by step guide on how you configure it.
Comment 3 tempel.julian 2020-02-11 13:57:50 UTC
Go into central Windows network share options and enable shares without authentication. Then create a new folder (e.g. on C:\, perhaps not inside the user folder), right click, properties, network share. Use the network share wizard, there add the user "everyone" and allow read/write.
That should be it.
Comment 4 Harald Sitter 2020-02-11 14:22:37 UTC
Doesn't seem to be working for me both another windows10 and ubuntu19.04 still want authentication https://imgur.com/a/v3ek8ha
Comment 5 Bug Janitor Service 2020-02-26 04:33:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Patrick Silva 2020-02-26 10:41:27 UTC
Does nautilus use kio to authenticate samba shares?
Yesterday I spent several hours trying to get rid of authentification
window that both Dolphin and Nautilus show when I try to open
passwordless shared folders from Windows 7.

Operating System: Arch Linux 
KDE Plasma Version: 5.18.2
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 7 Harald Sitter 2020-02-26 14:10:07 UTC
Still waiting for a guide on how to reproduce this.

@Patrick No. They both use libsmbclient though and that's the piece that actually asks KIO or GVFS for authentication. So, they are both being passive in that scenario, and if libsmbclient thinks it needs auth it pokes the higher level abstractions to get authentication through whatever way necessary (i.e. they'll show the auth GUI).
For samba shares (i.e. on linux servers) I can say for a fact that guest logins work out of the box and do not throw up an auth dialog, which does rather suggest that the problem is in libsmbclient.
Comment 8 tempel.julian 2020-02-26 14:41:11 UTC
Couldn't you confirm the issue yourself? Then I don't see what else would be left to reproduce?

Regarding GvFS: Perhaps I accidentally already saved "*" "*" as auth in gnome-keyring and thus it doesn't ask anymore.
Comment 9 Patrick Silva 2020-02-26 14:57:32 UTC
I think you can also save "*" "*" in "Windows shares" kcm.
Comment 10 tempel.julian 2020-02-26 15:07:52 UTC
Yes, but this still triggers the auth prompt, just with username and password already filled. But of course this is rather a minor inconvenience.

More inconvenient is that the user needs to know the "*" trick when accessing unprotected Windows share. Otherwise he won't get access.
Comment 11 Patrick Silva 2020-02-26 22:44:41 UTC
My system, Neon unstable, stopped asking for password to access passwordless
Windows shares after I save username and password of a user account of my server
(Windows 7) in "Windows shares" kcm. At least a workaround...
Comment 12 Nate Graham 2020-03-06 18:11:07 UTC
Information was provided.
Comment 13 Harald Sitter 2020-03-10 13:21:21 UTC
(In reply to tempel.julian from comment #8)
> Couldn't you confirm the issue yourself? Then I don't see what else would be
> left to reproduce?

No I couldn't. I could confirm that what KIO does is what both windows and ubuntu do as well. What you see in my screenshots is that when configuring one windows machine as per Comment #3 and then access it from another windows machine it will bring up an auth dialog. The same happened when I then tried a machine with nautlius/gvfs.

KIO behaved the same. So, I cannot reproduce your assertion that this works any different on gnome.

That is why I am still in need of a way to reproduce this.

Perhaps also for good measure: what happens if you don't enter a password but only a random username? What happens if you supply empty values for both?
Comment 14 Harald Sitter 2020-03-10 13:33:32 UTC
Oh, and perhaps also run

> kwriteconfig5 --file kioslaverc --group SMB --key DebugLevel 10

to enable smbc debugging and then

> killall kioslave5; killall -9 kiod5; QT_LOGGING_RULES="KIO_SMB=true" KDE_FORK_SLAVES=1 dolphin --new-window 'smb://YOURSERVERADDRESSHERE/share'

to try and access the server. authenticate */*. then attach all the output to the bug report

lastly disable debugging again

> kwriteconfig5 --file kioslaverc --group SMB --key DebugLevel 0
Comment 15 tempel.julian 2020-03-10 16:08:02 UTC
Afair it didn't work without providing "*" for both user name and password, but I didn't test something else since a long time ago.
I've stopped using Linux so I won't be able to provide any more information for the coming months or years.
Comment 16 Patrick Silva 2020-03-11 19:42:22 UTC
Created attachment 126730 [details]
password dialog with 'Remember password" checkbox

Watch the screen recording please.
https://www.youtube.com/watch?v=zfTosKiMLq0
I'm using my desktop computer (running Arch Linux) to access passwordless shares from Windows 7 installed on my laptop. Dolphin asks for password even to show the shares. When "No password, use anonymous (or guest) login" radio button is selected in password dialog and I press enter or click on "OK" button, Dolphin does not list the shares available and the password dialog shows up again. So I select "Use this password" radio button, type "*" (or any other fake login data) as username and password, press enter and Dolphin finally lists the shares from Windows 7 server.
Dolphin asks for password again when I try to open "Dados-laptop" passwordless share. Pressing enter while "No password, use anonymous (or guest) login" radio button is selected makes the password dialog to show up again. Selecting "Use this password" radio button and entering fake login data does also not work this time. The only way to open my passwordless share when Dolphin asks for password is entering username and password that I use to start my user session on Windows 7.

On my system there are 2 ways to prevent Dolphin asking for password when I try to list/open passwordless shares from Windows server:
1. entering username and password that I use to start my user session on Windows 7 in System Settings > Settings > "Windows shares" kcm.

2. I open system settings > Account details, check "Enable the KDE Wallet subsystem", click on "Apply" button. Then I try to open a passwordless share with Dolphin (now the password dialogs have "Remember password" checkbox as we can see the attached screenshot). In the first password dialog, I enter fake login data, check "Remember password" and press enter or click on "Ok" button. In the 2nd password dialog that Dolphin shows when I try to open a passwordless share, I enter username and password that I use to start my user session on Windows 7, check "Remember password" and press enter or click on "Ok" button. 

Now Dolphin does not ask for password even after reboot.

nautilus 3.36 installed on the same client system also asks for password to list the passwordless
shares from Windows 7, watch the following screen recording please.
https://www.youtube.com/watch?v=xcaJzoFwa80
If I click on "Connect" button while password field is empty,
password dialog shows up again. So I enter "*" as username and password and naulilus lists
the shares. Nautilus asks for password again (now it's a different password dialog with "Anonymous" and "Registered user" radio buttons) when I try to open a passwordless share. If "Anonymous" radio button is selected and I click on "Connect" button, nautilus shows the password dialog again. Nautilus also does not accept fake username and password "*"and it also only opens my passwordless share when I enter username and password that I use to start my user session on Windows 7.

Password dialogs of nautilus never appear again after the following steps:

1. in the first password dialog, enter fake login data
2. select "Remember forever" radio button
3. click on "Connect" button
4. try to open a samba share, 2nd password dialog shows up. Enter username and password that you use to start user session in Windows server
5. select "Remember forever" radio button
6. click on "Connect" button
7. reboot and check if nautilus is still showing password dialogs when you try to open a passwordless share: yes, 2nd password dialog is still appearing.
8. enter username and password that you use to start user session in Windows server again
9. select "Remember forever" radio button again
10. click on "Connect" button again
11. reboot again
Now you can access passwordless shares with nautilus without any password dialog.

Operating System: Arch Linux 
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 17 Patrick Silva 2020-03-11 20:09:35 UTC
Created attachment 126731 [details]
screen recording, Windows 7 client does not ask for password to open passwordless share from Windows 7 server

Windows 7 is also installed on my desktop.
It never asks for password to open the same passwordless share from Windows 7 installed on my laptop. Screen recording attached.
Comment 18 Bug Janitor Service 2020-03-26 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 19 Harald Sitter 2020-03-26 09:34:31 UTC
Comment #16 supports my theory that something is wrong inside libsmbclient rather than both KIO and GVFS. There is anonymous login support in libsmbclient and it clearly isn't working if you get an excess of login queries. Comment #15 makes me think that we could hack around this on our end though. Somewhere.

Someone please follow Comment #14 to get a debug log with libsmbclient's output as well and file a bug with libsmbclient:
https://bugzilla.samba.org/enter_bug.cgi?product=Samba%204.1%20and%20newer&component=libsmbclient
Comment 20 Patrick Silva 2020-03-27 12:10:25 UTC
Reported to Samba devs
https://bugzilla.samba.org/show_bug.cgi?id=14326
Comment 21 Nate Graham 2020-03-27 14:20:00 UTC
Thanks!
Comment 22 Nate Graham 2020-04-14 21:21:02 UTC
*** Bug 419992 has been marked as a duplicate of this bug. ***