I’m the sole (super)user of my system which is physically secure from untrusted users. I want to skip entering my password for administration purposes. For sudo I’ve achieved this with a file saying
jani ALL=(ALL) NOPASSWD: ALL
in my /etc/sudoers.d/.
For Policy Kit, according to pklocalauthority documentation, I’ve placed inside /etc/polkit-1/localauthority/50-local.d a key file I’ve named “90-net.mummila.jani.nopasswd.pkla”. Here’s the content of that file:
[We don't need no stinkin' passwords] Identity=unix-user:jani Action=* ResultAny=no ResultInactive=no ResultActive=yes
What this translates to is that when I’m logged in and on an active local session (sitting right here), I’m not required to enter my password for administration tasks.