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?