carter
asked Feb 09 2017
Answer
This can be done by two ways. Either by using usermod with nologin option or --lock option.
To restrict login using nologin, run the below command.
# usermod -s /sbin/nologin [USERNAME]
To restrict using --lock option,
# usermod --lock [USERNAME]
jagannatharumugam
asked Feb 12 2017
edited Oct 05 2018
How to disable the user from login to Linux
I need to disable the particular user from login. Only after my authentication the respective user should login. How the setup is to be done ???