I want to block a normal user from using a command, in sudoers file. I don't want the user to be able to use sudo at all. I tried editing sudoers file like this:
student ALL=/usr/bin/*, !/usr/bin/pwd
This doesn't seem to work, since the user has access to pwd command.Though, he doesn't have access to pwd command using sudo ( while having access to all other commands using sudo ). What I want, is for the user to be restricted to use sudo, and to be restricted from using the pwd command. Can this be done with sudoers file?