133
systemd Rolling Out "run0" As sudo Alternative
(www.phoronix.com)
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Community icon from opensource.org, but we are not affiliated with them.
Does it give alternative to
sudo -e
(sudoedit) too?i had the same question so I went through the source code and, for now, doesn't seem like it has implemented such option.
As the other comment said, no. But I've had the idea and will to at some point write a
edit
script (that I can just setEDITOR=
to) that would just choose one of the first common editors. That could in theory have a-0
option to run as root (there also probably looking throughrun0
,doas
,sudo
andsu
). Not the editor, but doing the editing on a temp file and then copying with rootOut of the box no. But it would be easy to implement if you don't need very complex rules. (I don't actually know how permissions work for sudoedit.)
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.
Yes, but how do you configure who is allowed to edit which files in
/etc/sudoers
?