I want to prevent the users from using the su
command, and so I blocked the command in /etc/sudoers
file as below:
%group ALL=(ALL:ALL) NOPASSWD:!/bin/su
But with this rule in sudoers
, they are unable to execute sudo <command>
commands, resulting in the error:
Sorry, user xxxx is not allowed to execute 'command' as root on <host>
Is there any way that the program sudo
relies on su
?
sudo
andsu
). – Kusalananda May 22 '23 at 13:16/etc/sudoers
so they can runvi
." User startsvi
viasudo
and then enters:!/bin/bash
. Instantroot
shell. That's just one example. That's why there's auditing... – Andrew Henle May 23 '23 at 04:39