This forum has been archived. All content is frozen. Please use KDE Discuss instead.

» tired of entering root password 100 times each day? SOLVED

Tags: polkit, root, password, pita, policykit, nopasswd, passwd, dolphin, kde, plasma polkit, root, password, pita, policykit, nopasswd, passwd, dolphin, kde, plasma polkit, root, password, pita, policykit, nopasswd, passwd, dolphin, kde, plasma
(comma "," separated)
User avatar
zachus
Registered Member
Posts
56
Karma
0
OS
2 posts below you find a polkit rc file which is permissive and allows to do stuff without ever prompting for any root password.

It simply is too tedious to enter passwd 100x a day on a home computer. ;D >:D


:'( A while ago one could use gksu in octopi, so that one could install many packages and enter root password only once, which already is too much.

Of course, this was too little PITA and besides YAOURT usually asking for TYPE YES IF REALLY WANT TO like 10 times per package, this has stopped now.


We're back to typing the darn passwd again and again and again and again each day.

There are tons of complaints about this in the forums, and there are those apologists claiming this is how Linux has fewer viruses than Windows which is baloney.

Truth is, the Linux desktop just has no designed usability. Usability of KDE is just whatever happens to be the end result of a lot of hacking, not the result of a design goal of usability.

just remember the guy who boasted on web about him killing the dolphin-as-root feature, full well knowing how much breakage he singlehandedly introduced.


I dabbled in pkexec kdesu kdesudo su sudo gksu gksudo and wtf but I guess , since it is only getting worse, I'll just switch to Puppy-Linux.

In Puppy, everything is run as root, end of story. no password, no trouble, all is fine and well and safer than ever.

Puppy is a project where certain folks can learn something. xD xD xD xD o) o) xD xD xD

Code: Select all
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true  dolphin

Last edited by zachus on Tue Nov 05, 2019 5:04 am, edited 4 times in total.


tosky
Registered Member
Posts
210
Karma
3
I'd suggest to contact the Yaourt developers, because what you describe seems to be an issue of that software (which is not developed by the KDE community). But in the end you wrote that this has stopped now. So the question is: which software asks for the root password again and again? In my experience, operations that requires privileged operations are not the ones executed more frequently in a normal desktop session.

If you feel safe by running everything as root, of course, that's up to you. It does not exactly match with the basic suggestions of security people, though.


tosky, proud to be a member of KDE forums since 2008-Oct.
User avatar
zachus
Registered Member
Posts
56
Karma
0
OS
Code: Select all
/*kate: hl JavaScript ;    https://forum.kde.org/viewtopic.php?f=15&t=156389#p408592
  Allow members of the wheel group to execute any actions without password authentication!
  Of course, this vital example is not given in the official manpage.
  in   /etc/sudoers.d/10-installer  do  #comment out any shenanigans!
  also in /etc/sudo.conf  comment out #Plugin sudoers_policy sudoers.so
  Globally --   Create the following text file as root:

sudo gedit /etc/polkit-1/rules.d/49-nopasswd_global.rules

  additionally, use    NOPASSWD:   in   visudo :
  ## Allow root to run any commands anywhere   in  /etc/sudoers
  you   ALL=(ALL)    NOPASSWD: ALL  ###   also try:

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true  dolphin

*/
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

Last edited by zachus on Mon May 11, 2020 10:16 pm, edited 14 times in total.


User avatar
zachus
Registered Member
Posts
56
Karma
0
OS

polkit allow everything

Tue Dec 18, 2018 11:40 pm
the above works with Pamac (which uses polkit) but not Octopi using KDEsu.

maybe tell octopi to use that gksu replacement package employing polkit rather than classic gksu, which "ignores" polkit.

yaourt does have a rc file where you can tell yaourt to stop bothering you with darn prompts.


make sure you enable maximum settings in /etc/sudoers via sudo visudo or sudo leafpad /etc/sudoers

replace 5 minutes with 5555 minutes timeout of password cache

Defaults timestamp_timeout=5555

pkexec htop # no password being asked , if all works well, but

pkexec ksystemlog # breaks . some X apps won't work this way.

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin

So currently we have a chaotic mishMash of Apps, some work with sudo, some with polkit, some not at all: try kuser for example:


sudo bash
kuser # will work, other ways will break. >:( :P :-\ :o

Last edited by zachus on Tue Nov 05, 2019 4:21 am, edited 1 time in total.


User avatar
firef
Registered Member
Posts
25
Karma
0
OS

works in Fedora:

Tue Nov 05, 2019 4:59 am
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin
User avatar
firef
Registered Member
Posts
25
Karma
0
OS
in mid 2020, polkit in KDE neon starts bothering us again! HERE IS THE FIX: >:D
https://askubuntu.com/questions/98006/h ... a-password

make sure you place the you ALL=(ALL) NOPASSWD: ALL line in /etc/sudoers at the very bottom of the textfile.


replace "wheel" with your group, e.g. the same as your username.
in file: /var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.packagekit.pkla (or one of the others there)


cat org.freedesktop.packagekit.pkla
[Allow admins to upgrade the system]
Identity=unix-group:sudo
Action=org.freedesktop.packagekit.upgrade-system;org.freedesktop.packagekit.trigger-offline-update
ResultAny=no
ResultInactive=no
ResultActive=yes


[Do anything you want]
Identity=unix-group:wheel
Action=*
ResultActive=yes


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]