Hi!

2016-09-26 23:25 GMT+02:00 Borden Rhodes <[email protected]>:

> As the subject says, on my Debian Stretch laptop, attempting to use
> the KDE print settings or KUser prompts me to login with the root
> account. This is a problem because I installed Debian with the root
> account locked out. I thought Polkit was supposed to have taken care
> of all of this. Perhaps I'm missing a package? I also reinstalled
> kdesudo to no joy.
>
> I'm sure other K settings apps are broken like this, too, but I
> haven't found them yet.
>
>
I was able to avoid the root password prompt from the KDE printer settings
module by just adding my user to the lpadmin group:

$ sudo adduser <user> lpadmin
(logout - login afterwards)

Other programs like KUser (KSystemLog is another one) seem a different
issue.
Apparently kuser, when launched from plasmashell, gains root privileges
through kdesu (not Polkit).

After you install kdesudo you *can* invoke it explicitly to start programs
with sudo, but applications configured to be executed as root in the kde
menu will still get root privileges through kdesu which requires the root
password.

If you want kdesudo to replace kdesu by default, you have to
'dpkg-reconfigure kdesudo' and select 'Yes' to divert kdesu:

# dpkg-reconfigure kdesudo
(select Yes, output:)
Adding 'diversion of /usr/lib/kde4/libexec/kdesu to
/usr/lib/kde4/libexec/kdesu.kde by kdesudo'
Adding 'diversion of /usr/share/man/man1/kdesu.1.gz to
/usr/share/man/man1/kdesu.kde.1.gz by kdesudo'

This used to work in kde4 (wheezy, jessie). It seems that those diversions
have no effect In kf5 because kdesu is loaded from a different location:

$ pgrep -ax kdesu
5676 /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu -u root -c /usr/bin/kuser
--icon kuser -caption KUser

So, in fact applications launched through the multiarch
/usr/lib/<arch>/libexec/kf5/kdesu will never use kdesudo even if the latter
is installed and configured to replace kdesu, this way you are always asked
to provide the root password, not the user one.

 As a workaround you can open kmenuedit, navigate to System->KUser (or any
other affected command), prepend 'kdesudo' to the command string and
uncheck 'run as a different user' in the Advanced tab.

Probably it's worth to file a bug against kdesudo even though the double
location of kdesu is also playing a role in this issue.

Regards

BZ

Reply via email to