how to restrict some commands for admin in Linux(CentOS)
I tried to use
visudo in root , and write
to restrict the "ABC" user not to remove some important files.
It worked very well in ABC user ,Linux denied my commands when I type
sudo rm -rf /etc/ or remove something important files that need super user.
But there is a problem in script.If I write a script about
sudo rm -rf /etc/, this script worked and deleted my
/etc/ by using
visudo seemingly can't not work in script.How should I do ?
I need my admin user can use all commands but can't delete my system files.