I know I can disable password aging with:

sudo visudo

And adding:

Defaults timestamp_timeout=-1

But how can I disable timeout when reading passwords instead? To avoid this kind of error:

[sudo] password for user:
sudo: timed out reading password
sudo: a password is required
 -> exit status 1
  • mekhos@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    I just enable curses, its funny, distracts you from the timeout and makes you relax/check the caps lock etc instead of getting frustrated.

  • thann@heapoverflow.mlM
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    It’s not advised to run apps with sudo.

    I created a script for vim that will let me save with sudo, so I just need the password when saving. I would recommend looking for a similar solution.

    • nachtigall@feddit.de
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      3 years ago

      You are right in general but not for the case of OP. It is strongly advised to edit the sudoers file with visudo only so that you can not lock yourself out accidently when messing up the config file. See visudo(8).