I accidentally untarred archive intended to be extracted in root directory, which among others included some files for /etc directory.
I went on to rm -rv ~/etc, but I quickly typed rm -rv /etc instead, and hit enter, while using a root account.

  • jjj@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    25
    ·
    3 days ago

    Is there any reason to use a root account? If you had used sudo for each privilege needing command in stead it would have stopped you.

    • thisbenzingring@lemmy.today
      link
      fedilink
      English
      arrow-up
      30
      ·
      3 days ago

      Is there any reason to use a root account?

      if you just borked your /etc and need to rebuild because you don’t have sudo anymore

      • rumba@lemmy.zip
        link
        fedilink
        English
        arrow-up
        4
        ·
        3 days ago

        I hand-edited sudoers.conf day one on the job without using visudo

        So in one day, I learnd both how to move a volume from one AWS VM and that there’s no good reason not to use visudo.

      • cholesterol@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        3 days ago

        I think they just mean you’d be prompted for a password, which should give you pause if you’re supposed to be deleting items in your home folder.

        • BeardedGingerWonder@feddit.uk
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          If you use sudo for each privileged command you wouldn’t typically use sudo to remove something in your home directory, so the command would fail. At which point you’d check why the command failed.