Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The first time a user enters sudo foo, sudo_root prompts for the password. For a certain duration after that, sudo_root doesn't prompt for a password for any subsequent sudo foo's in that terminal session.

  • What duration is that?
  • Can the duration be changed?
share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

This is covered in the Ubuntu Sudo FAQ entry here: https://wiki.ubuntu.com/SecurityTeam/FAQ#Sudo

The default is 15 minutes, but can be changed with *timestamp_timeout* in /etc/sudoers. For more details see "man sudoers"

share|improve this answer
1  
Here's a cheatsheet from webupd8.org/2010/04/… type sudo visudo go the line that says Defaults env_reset and change it to Defaults env_reset , timestamp_timeout=X with X in minutes –  belacqua Feb 2 '11 at 21:20
    
FYI: sudo -k invalidates an active sudo session. That is useful if you've huge timestamp_timeout values and do not plan to do any sudo stuff in the next minutes. –  Lekensteyn Jun 15 '11 at 8:30
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.