PDA

View Full Version : [SOLVED] [SOLVED] Howto: change default timeout (from 5 minutes) in sudo


arnieboy
May 28th, 2006, 12:21 AM
Some of you might not like the default timeout of 5 minutes after which sudo asks for your password again in a session. To change that do the following:
sudo visudo
scroll down and add the following line at the end:
Defaults:user_name timestamp_timeout=10
1) Change user_name to your actual user name.
2) Change 10 (in minutes) to anything you wish. A value of -1 will make it infinite (for a single session).
3) Hit Ctrl-X and then hit Y.
You are all set!

frodon
May 31st, 2006, 06:09 AM
Nice guide arnie ;)

Does it work for dapper too ?

arnieboy
May 31st, 2006, 10:31 AM
Nice guide arnie ;)

Does it work for dapper too ?
works for all ubuntu releases frodon.

Sammi
May 31st, 2006, 01:43 PM
So if I set it to infinite(-1), is there a manual way to turn superuser off after I use a sudo command?

arnieboy
May 31st, 2006, 02:27 PM
So if I set it to infinite(-1), is there a manual way to turn superuser off after I use a sudo command?
superuser is not "ON" when u use sudo. u merely let your user account gain super user permissions.
if u set it to -1, the sudo password will not timeout till u log out of your account.

Sammi
May 31st, 2006, 08:16 PM
I understand that much. Just wasn't clear enough in my previous post. The thing I was wondering is if there is another way of taking superuser priveledges away from the user account, after a sudo command with an infinite timer has been issued, other that logging off ofcourse?

If not then that option is kind of useless I think. Could just as well just make a root account if I wanted to stay in superuse mode all the time.

BobSongs
May 31st, 2006, 10:35 PM
So if I set it to infinite(-1), is there a manual way to turn superuser off after I use a sudo command?
If you set sudo's time to infinite (-1) you can kill it at any time with the followingsudo -KThis works regardless how long you set sudo to last. :)

Sammi
June 1st, 2006, 09:18 PM
There we go. Thx! :D

karthick87
December 24th, 2010, 04:19 AM
Short and useful how to :)