Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

New Polkit/pkexec in Bookworm

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

New Polkit/pkexec in Bookworm

#1 Post by CwF »

policykit-1 0.105-33 is now a meta package (was it always?) and pkexec is now a separate package. For those upgrading older setups things might break...

The update does not include the newly needed package 'polkitd-pkla' for 'legacy' systems relying on the /etc/polkit-1/localauthority. pkla file format of granting permissions. Unchecked the upgrade will wipe out this directory. After installing said package it re-creates the prior structure, and works as expected.

I have yet to determine what the new preferred format might be...
The new style is in the new directory /etc/polkit-1/rules.d in the "I like whitespace" javascript style found elsewhere on the net. So Debian isn't different now as it was with the former condensed simple pkla.

Also, in investigating this 'pkaction' no longer requires the '-l' switch and will list actions with no arguments. pkcheck still functions the same, and I can't remember the password... because polkit doesn't know it! So no correct password with a broken polkit. All fixed.

Another Edit; Today I upgraded more complete AMD64 images that happen to include apt-listchanges which kindly outlined what I typed above, including the suggestion to install the pkla package if desired. I usually lead into the new with my i686 770 pkg. minimal image that leads to this extra fun...

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: New Polkit/pkexec in Bookworm

#2 Post by CwF »

Bumping this old thread, I found it!

Most Debian 11 and prior should be cruising bookworm by now. I have reviewed this again, remember I'm early, then mia, then late, and have now removed this old long way. Purge polkitd-pkla since it is now longer needed and craft something in /etc/polkit-1/rules.d/ like 42-user.rules with the way you like it.
https://www.freedesktop.org/software/po ... kit.8.html

Single user simplicity, also grants rights to this user local or remote, so warning

Code: Select all

polkit.addRule(function(action, subject) {
    if (subject.isInGroup("username")) {
        return polkit.Result.YES;
    }
});
Note that the order in which things are done could matter! First make the new rule set, then delete or move the any user created files in /etc/polkit-1/localauthority/. Once empty apt will remove the directory when removing polkitd-pkla.

This completes my sudo and pkla removal.

There's always su -

Post Reply