• bamboo@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    5 个月前

    sudoedit copies a file to a temp directory, invokes $EDITOR with that temp file, and after the editor process exits, it copies the file back to overwrite the original. This way you get your user preferred and configured editor, but it doesn’t have any elevated privileges.

    • kevincox@lemmy.mlM
      link
      fedilink
      arrow-up
      1
      ·
      5 个月前

      Yes, but how do you configure who is allowed to edit which files in /etc/sudoers?