0

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 ???

carter
asked Feb 9, 2017
1 Answer
0

This can be done by two ways. Either by using usermod with nologin option or --lock option.

  1. To restrict login using nologin, run the below command.

    # usermod -s /sbin/nologin [USERNAME]

  2. To restrict using --lock option,

    # usermod --lock [USERNAME]

View More
jagannatharumugam
answered Feb 12, 2017
Your Answer
||||
x
 
100:0

Related News in How to disable the user from login to Linux

Related News in How to disable the user from login to Linux