Image transcription: screenshot of neovim adding alias ls='sudo rm -rf / --no-preserve-root' to the end of ~/.zshrc

  • ninjan@lemmy.mildgrim.com
    link
    fedilink
    English
    arrow-up
    43
    arrow-down
    1
    ·
    1 year ago

    That sudo might save the poor victims ass if they’re awake enough to wonder “why does it ask for password when I’m just doing ls?”

    Otherwise it’s a good lesson in always having backups / easy way to reproduce your setup.

    • bdonvrA
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      11 months ago

      Pffft who’s not using passwordless sudo anyway

      • ninjan@lemmy.mildgrim.com
        link
        fedilink
        English
        arrow-up
        5
        ·
        11 months ago

        I don’t, after doing the classic rm -r -f / when I meant ./ the second time I realized I’m too much of a dumbass to be allowed to use sudo without password.

      • voidMainVoid@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        I’ve always had a password. One of the biggest benefits of Linux is security. Why would you undermine that by not using a password?

        • bdonvrA
          link
          fedilink
          arrow-up
          4
          ·
          11 months ago

          I do have a password. Sudo is just setup not to ask for it.

          On servers of course I use a password for sudo - but on a home machine there’s not much of a point I don’t think. It’s off when I’m not actively using it, and if some attacker or malware has access to my user they already have access to all my important files, or have physical access.