Bugzilla – Bug 1207402
kwallet does not prompt when using grsync
Last modified: 2023-11-16 14:04:07 UTC
apps: kwallet, ksshaskpass, grsync 1. dolphin connects via smb to smb-server. kwallet prompts correctly for pw. 2. use grsync to sync files from local to smb-server. 3. No matter which way (with "-e ssh" or without), kwallet does NOT prompt for pw (nor for fingerprint). 4. copy the exact same command (rsync -r -t -v --progress -e ssh <source> <dest>) into terminal and it asks for pw inside terminal and the sync works. 5. bypass kwallet and use grsync with "--password-file=pw" and the sync works. (Tumbleweed 20230119, KDE plasma 5.26.5)
cross-check with KDE-neon installation. ksshaskpass is correctly prompting when sync with grsync starts.
Is $SSH_ASKPASS set?
(In reply to Fabian Vogt from comment #2) > Is $SSH_ASKPASS set? Where should that be set? In grsync.ini?
(In reply to flint fire from comment #3) > (In reply to Fabian Vogt from comment #2) > > Is $SSH_ASKPASS set? > > Where should that be set? In grsync.ini? As environment variable. Does it work with SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest>?
(In reply to Fabian Vogt from comment #4) > (In reply to flint fire from comment #3) > > (In reply to Fabian Vogt from comment #2) > > > Is $SSH_ASKPASS set? > > > > Where should that be set? In grsync.ini? > > As environment variable. > > Does it work with SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v > --progress -e ssh <source> <dest>? In the file: /etc/sysconfig/ssh I added & tested the following settings/lines (one after one): 1) SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass -did not work. I think "ssh-askpass" was installed by me and is not in the default installation, because it simply points to ksshaskpass. 2) SSH_ASKPASS=/usr/libexec/ssh/ksshaskpass - did not work. 3) SSHD_ASKPASS=/usr/libexec/ssh/ksshaskpass - did not work. I thought it's worth a try. 4) SSHD_ASKPASS=/usr/libexec/ssh/ssh-askpass -did not work. I thought it's worth a try. To be sure I did a restart after every change of /etc/sysconfig/ssh. On an older pc, I also have Leap 15.4 installed. There the sync with grsync and "-e ssh" works just fine. But on that linux in the file /etc/sysconfig/ssh there is no special/additional setting or line existing, so could it be that we are at the wrong spot?
(In reply to flint fire from comment #5) > (In reply to Fabian Vogt from comment #4) > > (In reply to flint fire from comment #3) > > > (In reply to Fabian Vogt from comment #2) > > > > Is $SSH_ASKPASS set? > > > > > > Where should that be set? In grsync.ini? > > > > As environment variable. > > > > Does it work with SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v > > --progress -e ssh <source> <dest>? > > In the file: /etc/sysconfig/ssh I don't know what that file is for, but it looks unrelated to SSH_ASKPASS. Please run SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> as command.
please read point 4. in my very first post: "4. copy the exact same command (rsync -r -t -v --progress -e ssh <source> <dest>) into terminal and it asks for pw inside terminal and the sync works. "
(In reply to flint fire from comment #7) > please read point 4. in my very first post: > "4. copy the exact same command (rsync -r -t -v --progress -e ssh <source> > <dest>) into terminal and it asks for pw inside terminal and the sync works. > " That's without the "SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass" part in the beginning.
as commands in the konsole: 1. SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> 2. SSH_ASKPASS=/usr/libexec/ssh/ksshaskpass rsync -r -t -v --progress -e ssh <source> <dest> 3. rsync -r -t -v --progress -e ssh <source> <dest> in the konsole it asks for the pw, after enter it syncs fine. All ok, no errors and no difference between 1.-3. There is no prompt from the kwallet window outside the konsole or so (what I don't expect), if you were looking for that?
(In reply to flint fire from comment #9) > as commands in the konsole: > > 1. > SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh > <source> <dest> > > 2. > SSH_ASKPASS=/usr/libexec/ssh/ksshaskpass rsync -r -t -v --progress -e ssh > <source> <dest> > > 3. > rsync -r -t -v --progress -e ssh <source> <dest> > > in the konsole it asks for the pw, after enter it syncs fine. All ok, no > errors and no difference between 1.-3. > There is no prompt from the kwallet window outside the konsole or so (what I > don't expect), if you were looking for that? Yep! What's with this? SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest>
Getting interesting. Command: SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> brings up error: qt.qpa.plugin: Could not load the qt platform plugin "xcb" in "" even thought it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
(In reply to flint fire from comment #11) > Getting interesting. Command: > > SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r > -t -v --progress -e ssh <source> <dest> > > brings up error: > > qt.qpa.plugin: Could not load the qt platform plugin "xcb" in "" even > thought it was found. > This application failed to start because no Qt platform plugin could be > initialized. Reinstalling the application may fix this problem. That means you're calling it from a context which is not able to connect to the X server. Is this inside a sudo session or something? That won't work with kwallet.
(In reply to Fabian Vogt from comment #12) > > That means you're calling it from a context which is not able to connect to > the X server. Is this inside a sudo session or something? That won't work > with kwallet. As normal user, I start konsole and paste-in: in Leap 15.4: SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> =>new popup window outside of konsole comes up and kwallet needs permission. After klick allow, sync starts and is ok. In Tumbleweed: SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> =>above described error message. No popup-window. No sync. Also same result as superuser in konsole.
(In reply to flint fire from comment #13) > (In reply to Fabian Vogt from comment #12) > > > > That means you're calling it from a context which is not able to connect to > > the X server. Is this inside a sudo session or something? That won't work > > with kwallet. > > As normal user, I start konsole and paste-in: > > in Leap 15.4: > SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass rsync -r -t > -v --progress -e ssh <source> <dest> > > =>new popup window outside of konsole comes up and kwallet needs permission. > After klick allow, sync starts and is ok. > > > In Tumbleweed: > SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r > -t -v --progress -e ssh <source> <dest> > > =>above described error message. No popup-window. No sync. Also same result > as superuser in konsole. But you can call "kdialog --msgbox Hi", right? Does it work if you do SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass ssh <source> <dest> i.e. without rsync?
in konsole: kdialog --msgbox Hi =>new popup window outside of konsole comes up with "Hi" in it. Click ok.
in konsole: SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass ssh <user>@192.168.1.110 =>new popup window outside of konsole comes up. Kwallet service > allow. ksshaskpass is asking for pw. Put in pw and ok (at the end permission gets denied because admin per ssh is on server not available. But [as described] sync per ssh is ok.)
(In reply to flint fire from comment #16) > in konsole: > > SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass ssh > <user>@192.168.1.110 > > =>new popup window outside of konsole comes up. Kwallet service > allow. > ksshaskpass is asking for pw. Put in pw and ok (at the end permission gets > denied because admin per ssh is on server not available. But [as described] > sync per ssh is ok.) Ok, so it looks like rsync is not forwarding the necessary environment to SSH? Reassigning.
for completion: All these test were done with rsync --version 3.2.7 protocol version 31
Info: Today redone tests with up-to-date Tumbleweed (20231114) and it's still not working. KWallet is not passing the necessary pw to grsync and so grsync shows "Permission denied" error. Per konsole rsync works fine when typing in the pw.
Update: 1) In Tumbleweed with X11 1a) in konsole command: SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> =>Error: Could not load the qt platform...(see full message above) 2) In Tumbleweed with WAYLAND 2a) in konsole command (same as above): SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass rsync -r -t -v --progress -e ssh <source> <dest> =>WORKS (no error): KDE Wallet Service pop-up window appears. Put in pw, sync works and all ok. 2b) in grsync with additional options setting: SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/libexec/ssh/ssh-askpass -e ssh =>Error: No asking for pw. Error no permission.