StackExchange: Change default sudo password timeout
Verify /etc/sudoers
to contain the line @includedir /etc/sudoers.d
.
Create a new file sudo vi /etc/sudoers.d/sudo-session-timeout
and insert following line:
Defaults timestamp_timeout=30
See also Sudoers Manual: User Authentication