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.

1 Answer 1


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.

  • 1
    That's great, works as expected. Thanks a lot!
    – plasmating
    Apr 27, 2015 at 0:02
  • For some reason created pkla file is not working on my system. I have polkit 0.105 and 18.04. How to debug what is wrong?
    – Suncatcher
    May 6, 2018 at 9:07
  • @Suncatcher afaik nothing significant has changed for Polkit in 18.04 (we're still well behind upstream 0.114 or the 0.112 release that include JavaScript rule definition support). Please post a new question with the exact filename and contents. You can leave a comment here when that's done, so I can take a look.
    – muru
    May 6, 2018 at 9:13
  • created, but on 18.04 I have old 0.105 polkit.
    – Suncatcher
    May 6, 2018 at 9:37
  • Is disabling policykit password prompts this way a security risk? On a system with a single admin user, can graphical applications take arbitrary actions?
    – Travis G.
    Jul 25, 2020 at 4:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.