Ubuntu / Linux news and application reviews.

The first time you run a command with "sudo" in Ubuntu, you are asked for a password but after running one more command with "sudo" (after a short while), you are not prompted for a password again. That's because "sudo" has a default password time-out (I'm not sure how long it takes to expire though).

Here is a quick tip to set the exact time-out for "sudo" password remembering in Ubuntu. Open a terminal and type:

sudo visudo

Then scroll to the line that says:
Defaults env_reset

and edit it so that it looks like this:
Defaults env_reset , timestamp_timeout=X

Where X is the number of minutes after which the password should expire, so set it to whatever you want. If you set it to 0, the password will always be required.

Once you're done editing the file, press Ctrl + X, type "y" (yes), press ENTER and that's it.

[thanks to ubucentrum for the tip!]