

But he or she can log on to the system via programs such as ftp that do not necessarily require a shell for the user to connect to a system.Īdditionally, it can allow you to block shell access to specific users in special scenarios.


This method works a little differently: it only blocks a user from accessing a shell. Block User Login in Linux How to Block User Logins Using nologin Shell Now you can test if it all works as you can see from the screen shot below, a normal user tecmint is not able to login. For more information, contact the system admin. We apologize for any inconvenience caused, the system will be up and running in 1 hours time. The Server is down for a routine maintenance. # vi /etc/nologinĪdd the message below to the file, which will be shown to users attempting to log on to the system. This can be used to block user login by manually creating the file as follows.
