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@pawb.social
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    16 days ago

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

    • 2ndSkin
      link
      fedilink
      arrow-up
      6
      arrow-down
      2
      ·
      16 days ago

      If the .bashrc is immutable, the attacker can’t remove it.
      That’s how it works.

        • 2ndSkin
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          15 days 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@pawb.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            15 days 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.