Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to prevent Gnome from asking for password so often? I don't see what purpose they serve.

  • When putting the laptop to sleep and waking it back up, it's almost always in my control the whole time. I'd like to not have to log in again unless I explicitly Lock the Screen (Ctrl-Alt-L).
  • When Update Manager tells me there's something new, why ask for the sudo password? I'm already logged in as the main user. If there's malicious code, I'm just as in trouble if it runs as my user as if it runs as root. Requiring password for software that touches /usr/bin but not asking for password when it messes with ~/ seems arbitrary.

I know it's not as bad as User Account Control (UAC) in Vista, but it still kind of ticks me off every morning. I'm using Ubuntu Lucid / Gnome 2.30.2.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

To disable locking your computer on sleep/hibernate, press ALT+F2 or open a terminal and run gconf-editor. Then, expand the apps folder, and then the gnome-power-manager folder, and choose lock. Uncheck all the options on the left to disable all power management related locking mechanisms. Your computer will now stop asking for password after waking up from sleep or hibernate. The window should now look like this:

gconf-editor /apps/gnome-power-manager/lock

Matt Jenkins explained how to sudo without your password, but you also asked why its necessary. The distinction certainly isn't arbitrary. Stuff messing with /usr/bin can cause your computer not to boot, whereas nothing in ~ can affect that. Restoring your files from backup isn't that hard. Restoring them and completely recreating an operating system installation with the correct software and configuration takes quite some time. Also, programs running with root access have access to everyone on the system's home directories, not just yours. If you wanted to try out a dodgy program, you can run it as a different user and be assured it can't hurt anything important.

share|improve this answer
add comment

In theory you can alter the sudoers file to include the NOPASSWD: setting for admin users. This should stop it asking for the password for admin operations.

%admin ALL=(ALL) NOPASSWD: ALL

NB: I have tried this in the past and it has played up sometimes, so suck it and see.

I assume you have already disabled the auto-locking of the screen in the screen saver settings.

I can't help you with the sleep / hibernate password though I'm afraid.

share|improve this answer
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.