I see people talking about doas saying it’s just like sudo but with less features. I’m just wondering if there is any situation where you should use doas or if it’s just personal preference.

  • WalrusByteEnglish
    arrow-up
    12
    arrow-down
    0
    ·
    7 months ago
    link
    fedilink

    From what I hear, doas is more secure. I don’t think it matters though, as long as you keep your system updated. I use sudo still.

    • ZephrC
      arrow-up
      9
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      It’s really only more secure in the sense that in general more complicated programs have more things that can go wrong with them. Either bugs, or just user error.

      That is a valid concern, and most people don’t need or use any of sudo’s extra features, so it’s completely reasonable to switch to doas because of that, but it’s not like there’s some glaring security flaw in sudo that most people really need to worry about. Especially if they’re not doing weird things in the config, which would mostly be the same people who could easily switch to doas anyway.

    • Yuki
      arrow-up
      3
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      How is it more secure?

      • youRFate
        arrow-up
        9
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        Afaik much smaller code base and as such easier to audit.

      • whyisthesheepOPEnglish
        arrow-up
        1
        arrow-down
        3
        ·
        7 months ago
        edit-2
        7 months ago
        link
        fedilink

        I think it’s because sudo only requires a password the first time on each shell.

        • bleistift2English
          arrow-up
          9
          arrow-down
          1
          ·
          7 months ago
          link
          fedilink

          sudo maintains ‘sudo state’ for 15 minutes. After that you need to enter the password again.

        • Alex
          arrow-up
          6
          arrow-down
          0
          ·
          7 months ago
          link
          fedilink

          It’s entirely configurable but I think by default sudo will “cache” your authentication for a period of time so multiple commands in the same session only need the password entered once. You can even configure sudo to not need a password for certain commands (although obviously you need to be careful you’re not opening a hole in your security).

          • wvstolzing
            arrow-up
            2
            arrow-down
            0
            ·
            7 months ago
            link
            fedilink

            doas is likewise configurable; though the mechanism that keeps track of the timeout is different on OpenBSD (where doas originated) & Linux ---- and there used to be some reservations about the latter implementation.