I have the following problem:
I configured sudo with permissions for everything except for a few commands, remove, reboot, shutdown, block from sudo to shell, preventing a user from elevating the privileges with the sudo -i
command or change the password for example.
If someone runs the command sudo vim
and opens a shell from within the editor, it manages to elevate the privilege to root.
Does anyone know of any way to block this command, from within the editor?
rvim
(restricted vim) which doesn't allow shell commands; but usingsudo
with permissions to everything is the same as giving everybody root. (and usingsudo
at all is a horrible idea in the 1st place no matter how, where or when).