Password PolicyKit – How to Disable Authentication Prompts in Ubuntu 15.04


I'd like to know how I can disable the authentication prompts when opening apps such as Synaptic, mounting disks and so.

I got my user as passwordless set in sudoers, but seems the change to systemd changed something and now I keep getting prompted. Is there any way to set it like sudo in /etc/sudoers so my user can open such apps unprompted?

I am aware of the security risk, but this computer is not connected to the internet and no one else has access to it, I am aware of the safety risk, but I want to do this anyway, for convenience.

Best Answer

As I understand it, these prompts use Polkit, not sudo, for authorization. Therefore, setting NOPASSWD in sudoers won't make any difference to it. To make Polkit skip password prompts, create a .pkla file in /etc/polkit-1/localauthority/50-local.d/ (say /etc/polkit-1/localauthority/50-local.d/99-nopassword.pkla) containing:

[No password prompt]

See the pklocalauthority manpage for more information.

Related Question