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?