2

Possible Duplicate:
How I can make sudo session an hour and not few minutes in Ubuntu 10.04?

Ubuntu 10.10 asks password everytime I try to do some administrative task. How can I avoid it ? Uhat I can save password for a session?

Udara S.S Liyanage
  • 511
  • 1
  • 6
  • 16

1 Answers1

1

It's a (security) feature, not a bug!

sudo won't ask you for a time, about 15 minutes should be standard. You can adjust that to a longer value using visudo:

Defaults      env_resets,timestamp_timeout=-1

timestamp_timeout: Number of minutes that can elapse before sudo will ask for a passwd again. The default is 15. Set this to 0 to always prompt for a password. If set to a value less than 0 the user’s timestamp will never expire. This can be used to allow users to create or delete their own timestamps via sudo -v and sudo -k respectively.

If you really don't like it: log in as root (probably by setting a password first and enabling log on to X11)

mbx
  • 764
  • 2
  • 12
  • 22
  • 2
    Please don't...if you want to, make the `sudo` session last longer, I'm fine with that, but don't work as `root` by default and especially not with an X-Session on top of it...it's a very effective way to nuke your system in *so many different* ways you can't even imagine. There's a reason why it is always frowned upon in the Unix/Linux world...hell, even Microsoft realized this (a decade too late, but hey, at least they're learning). – Bobby May 11 '11 at 09:00
  • @Bobby: absolutely, just as I said: it's a feature ;-) – mbx May 11 '11 at 09:05