Is there a way to require a user to wait a certain time instead of asking for a password every time he wants to execute a command as root or access the root / or another user account?

  • Hawke@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    11 hours ago

    This is not entirely accurate; there are plenty of times when sudo does not require a password even in the default config. And there’s the nopasswd option built-in already which would already do that portion of this request.

    It sounds like the OP wants to use sudo as a Molly-guard. There’s nothing wrong with that, although it may not be the right tool for the job.

    • Peter G@discuss.online
      link
      fedilink
      arrow-up
      2
      ·
      7 hours ago

      There are plenty of ways to configure Linux to circumvent sudo. I’ve even seen people who log in as root by default. I do not, however, advise anyone to do that even if it’s just, as you put it, a Molly Guard. It has prevented me personally from doing catastrophic things to my system on a number of occasions.

    • mina86@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 hours ago

      Having to type sudo already acts as a moly-guard. Whatever OP wants to do I won’t stop them, but they are doing something strange.

      • enkers@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        4 hours ago

        While I pretty much agree, I can definitely think of a few sporadic times doing sysadmin where things have gone so significantly wrong that an enforced sanity-check on every sudo command would have been appreciated.