michael
asked Feb 08 2017
Answer
It is possible by many ways, the simple is to use chattr command. If the new user is to be created in Linux, at first it will redirect to the /etc/passwd file. So if that file is restricted to access using chattr command, either root user or the user with sudo access cant able to add the new user....
# chattr +i /etc/passwd
This command will restrict the access to create new user... To revert back run the same command by replacing with -i
jagannatharumugam
asked Feb 07 2017
edited Oct 05 2018
how to block creating new user in linux
Hello,
Am using redhat OS. I need to restrict creating the new user either from root or user with sudo access... Is it possible to do so???