Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
    
check this out: askubuntu.com/questions/68292/… –  Geppettvs D'Constanzo Aug 6 '12 at 21:44
    
Similar to askubuntu.com/questions/43969/… –  John S Gruber Aug 7 '12 at 3:05
    
@GeppettvsD'Constanzo - something must have changed in Ubuntu 12.04, because I do not have a "default" group. Only login, and those are misc passwords before I started using LastPass. –  Christopher Monsanto Aug 7 '12 at 4:00
    
@JohnSGruber - the top answer there is the "NOPASSWD" approach which won't work for many Ubuntu applications. That trick has been in my arsenal for a while, it is the Ubuntu specific stuff that is getting me. The other link for RootSudo is the approach you mentioned in your answer, which I have replied to separately. –  Christopher Monsanto Aug 7 '12 at 4:04
1  
Same as askubuntu.com/questions/98006/…? –  John S Gruber Aug 7 '12 at 5:12
add comment

3 Answers

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.

share|improve this answer
    
Graphical programs should be run with gksu/gksu‌​do or kdesudo, though, not directly with straight sudo. –  Eliah Kagan Aug 10 '12 at 5:56
add comment
up vote 0 down vote accepted

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]
Identity=unix-group:admin
Action=*
ResultActive=yes

Log out and back in, and enjoy!

share|improve this answer
add comment

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.

share|improve this answer
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
    
Thanks for the policykit piece, Christopher. –  John S Gruber Aug 7 '12 at 5:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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