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?

link|improve this question
feedback

closed as exact duplicate by Bobby, Gareth, Sathya May 11 '11 at 8:56

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

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)

link|improve this answer
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 9:00
@Bobby: absolutely, just as I said: it's a feature ;-) – mbx May 11 '11 at 9:05
feedback

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