I would only like a password prompt at login and lock screen (i.e, to make sure others don't use my computer). However, when I am at my computer, I do not want to be prompted at all for my password, for any reason.

I realize it is a "security risk", but I am a developer and the loss of convenience is more important to me.

Adding "NOPASSWD" to sudoers will stop it from prompting at the shell, but stuff like Update Manager and Ubuntu Software Center will still bother me.

Any help is appreciated. Thanks!


If you make your own launchers for them in the style sudo update-manager then they will start with full privelidges but not prompt you. The default shortcuts to these programs are structured to prompt you before they run, so just don't use those.


OK, I found the answer to my own question. Turns out this ridiculous non-sudoers-respecting password prompt application is called PolicyKit. No way in hell would most people know about this application, so it is hard to Google for. This question will put an end to that!

Fix is simple: in /var/lib/polkit-1/localauthority/50.local.d, create a file called disable.pkla (or whatever you want, as long as it ends with .pkla) with the following contents:

[This name does not matter]

Log out and back in, and enjoy!


As a developer, you should already know that this is a bad idea. When absolutely necessary I've been known to execute sudo bash and enter a few commands. I know how far to (not) trust myself from experience, so I keep the time I leave that shell around to the very minimum and do it only once or twice a year. Sudo works for me very well.

Ubuntu is a free and open source distribution, and you are free to do whatever you want.

At AskUbuntu the standard is to copy the information from other resources (legally) to prevent stale links and, as importantly, to keep the information right at hand.

Because the reference is very long, and has very important warnings, I'm going to paste a reference instead. The idea would be to enable the root account and then use that for what you want. Here is the reference.

For programs like the software center that use policykit rather than sudoers a change to policykit is necessary. The reference is here.

I strongly recommend that you and the others who refer to this question not do this.

  • 1
    I disagree that this is such a bad idea. If something bad happens to my root, I will format the partition. Any important passwords are in LastPass (and are readable without root anyway). Important things are mirrored on an external drive and GitHub. productivity_gained_by_not_entering_in_my_long_password - very_small_chance_of_problem * productivity_lost_by_restoring_backup > 0. – Christopher Monsanto Aug 7 '12 at 3:45
  • Re RootSudo: I don't necessarily want to run as the root account. My directory structure and such are fine as-is, and I like my username... some have warned about applications hardcoding the name "root" and not working after the rename. I don't know if that is true or not, but if there is another option that would be great (why would it be so hard to do this?). If there isn't another option, I guess I will have to suck it up. – Christopher Monsanto Aug 7 '12 at 4:07
  • Also, if you are not required to type in some password, then there is less chance of leaking some actual password. – prusswan Oct 11 '16 at 9:17

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.