Restrict/deny user to login in system

How to Restrict/disallowed user to login in system

[root@server ~]#touch /etc/nologin
[root@server ~]#useradd abc
[root@server ~]#passwd abc

Note :Now logout/restart machine.After creating nologin file only root can login in system. Again if you want to allow user to login in system then delete nologin file from root account.
Login with abc user


#####Thanks for Visiting on my blog, Have a good Luck !!#####
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment