Fake shell or nologin shell

At times, we may need a user account with a password for authentication with a system, but do not require an interactive shell with that username. This helps in preventing the user account being used for logging in to the system with that password. In those scenarios, we can set the user's shell to /sbin/nologin. If the user tries to log in to system, the nologin shell closes the connection of the user as shown in the following screenshot:

An example of such a situation could be a mail server, where a user account is needed to store mail and passwords for the user to authenticate with the mail client and retrieve their mail; however, if the /sbin/nologin shell is assigned, then the user cannot log in to the system using that account.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.30.210