- Open terminal and type "sudo visudo"
- Locate the "Defaults ...." line as shown in the image below
- Add this to the end of the line - ",timestamp_timeout=0"
- Setting the timeout to 0 will prompt for the sudo password on every login. Alternatively this timeout can also be set to a number - e.g. setting it to 5 will remember the sudo password for 5 minutes.
- Save the file and exit