By default, terminal stores the password for 15 mins to ease the user in case of continuous sudo activities such as installation or upgrades. In order to override these defaults, we must edit the /etc/sudoers.tmp as follows:
1 | # This file MUST be edited with the 'visudo' command as root. |
The timestamp_timeout=0 means that terminal will always ask for password when we do actions with sudo.
Caution: Mind that it is a timer. So, when we place values lesser than 0 like -1, it means that the password will be asked once and never again even after reboot.
As the comment suggests, always edit the file using sudo visudo command. This makes sure that others do not edit the file while you are. It is safer that way! \O/
Tip:
sudoers.dis powerful when it comes to configuring user permissions down to what commands and programs one can execute and what not. O_O