How do you prevent Gnome from asking for password all the time?

1

0

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.

yonran

Posted 2011-04-18T18:48:53.353

Reputation: 482

Answers

1

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.

Patches

Posted 2011-04-18T18:48:53.353

Reputation: 14 078

"Restoring them and completely recreating an operating system installation with the correct software and configuration takes quite some time." -- Using NixOS makes the latter trivial as well. :) – Kiara Grouwstra – 2018-08-26T15:53:29.783

1

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.

Majenko

Posted 2011-04-18T18:48:53.353

Reputation: 29 007