I'm administrating an Arch Linux server.
How can I securely add emacs to my
/etc/sudoers editor variable? Currently I have "emacs" but that allows
M-x shell. Basically, I want something like
rvim, but for emacs.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You probably can't do that.
Emacs is a Lisp Interpreter that runs an editor (which is written in emacs lisp), so every time you use emacs, you have access to the the lisp interpreter itself.
That interpreter can do all kinds of things: create/remove files or directories, change access rights etc... Basically, once you're inside emacs, you do not need to have access to a shell to do considerable damage - emacs itself is powerful enough.
Your best bet is probably to find a small emacs clone (for example here: http://www.emacswiki.org/emacs/EmacsImplementations ) that supports restricted editing.