How to create a Linux user that cannot log in

2461

As a Linux system administrator, there are times when you might need to create a user who doesn’t have the ability to log in. When would that type of user be necessary? Say, for instance, you have to create a user for an application to function properly, but you don’t want that user to either have a home directory or the ability to log in.

Why? Security. The more users you have on your Linux system, the higher the chances malicious actors can break in and wreak havoc. This is especially true when we’re talking about a user account that won’t be used by an actual human, so it won’t be monitored in any way. There are a number of ways to take care of this task, but here is the correct way to do it.

[Source: TechRepublic]