KDE on Ubuntu – How do I prevent PolicyKit from asking for a password? 

You can use the same technique Ubuntu’s Live CD uses by tricking PolicyKit and suppressing ALL password prompts by substituting the action with a wildcard.

DISCLAIMER: The following will suppress ALL password prompts globally for everyone belonging to the admin group, with the exception of the login screen. It is EXTREMELY dangerous and should NEVER be implemented because chances are YOU WILL END UP BREAKING YOUR SYSTEM!!

Don’t say you weren’t warned!

NOTE: If you are running 12.04 or later, substitute “admin” with “sudo”!

Replace “username” with your actual user name:

usermod -aG admin username

Switch to root:

sudo -i

Create a new policy:

gedit /var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla

Add the following:

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

Save and exit. Then go try something that usually requires a password. 🙂

NOTE: It doesn’t matter what you use as your .pkla file name. You can name it anything you want.

sudo – How do I prevent PolicyKit from asking for a password? – Ask Ubuntu

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>