On a server I have a public key auth only for root account. Is there any point of logging in with a different account?

    • SavvyWolf
      link
      fedilink
      English
      12 months ago

      I don’t think that actually works; the attacker could just remove .bashrc and create a new file with the same name.

      • WheelchairArtist
        link
        fedilink
        22 months ago

        you’re right. that’s something i wanted to look into. guess setfacl would do the trick?

        • SavvyWolf
          link
          fedilink
          English
          22 months ago

          The home directory would need to be immutable, not bashrc.

          • @[email protected]
            link
            fedilink
            4
            edit-2
            2 months ago

            ?

            It’s .bashrc, not bashrc, and .bashrc is in the home directory.
            If .bashrc is immutable, it can’t be removed from home.

            • SavvyWolf
              link
              fedilink
              English
              12 months ago

              It’s the directory that needs to be writable to delete files, not the file itself.

              Although the immutable bit (if that’s what you’re talking about - I thought you meant unsetting the write bit) might change that, I’m not sure.