Howto Fix the Error of "sudo: timestamp too far in the future"

If you made a mistake when you were adjusting the time and date of your Linux system, you may not be able to run sudo for a while. There are a couple of options you can try to fix this:

  1. Execute "sudo -k" to clear the sudo timestamp.
  2. Execute "sudo -K" to clear the user's timestamp entirely.
  3. Execute "sudo -v" to reset the user's timestamp.
  4. On Ubuntu, you can use the GUI "Adjust Date & Time" to set the date/time to the sudo timestamp or later, or correct the date/time.

If you are on Ubuntu, please consider enabling the su (root) account:

# sudo passwd root
# sudo passwd -u root