1

If I execute sudo su, I am asked for my password ( [sudo] password for ... )

After do some stuff, I can leave this root mode with exit.

If I execute again sudo su, I will not be asked for a password again. (Only if a few minutes have passed)

I can immediately let it forget the password with sudo -k or sudo -K but how can I disable it completely for all users or better: How can I modify the timer?

1 Answer 1

1

Run sudo visudo and on the line

Defaults env_reset

add (separate it with a comma)

timestamp_timeout=0

The line should then look like this:

Defaults env_reset,timestamp_timeout=0

From now on sudo should ask for password every time for any user.

EDIT: You can of course set the timeout to any value.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .