How to create a Linux user that cannot log in

    Date28 Feb 2020
    647
    Posted ByBrittany Day
    Linuxadminhero

    For security reasons, you might need to create a Linux user without the ability to log in. Jack Wallen shows you how.

    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 I want to show you the correct way to do it.

    LinuxSecurity Poll

    What do you think of the LinuxSecurity Privacy news articles?

    No answer selected. Please try again.
    Please select either existing option or enter your own, however not both.
    Please select minimum 0 answer(s) and maximum 3 answer(s).
    /main-polls/25-what-do-you-think-of-the-linuxsecurity-privacy-news-articles?task=poll.vote&format=json
    25
    radio
    [{"id":"90","title":"Love them!","votes":"48","type":"x","order":"1","pct":88.89,"resources":[]},{"id":"91","title":"I'm indifferent","votes":"4","type":"x","order":"2","pct":7.41,"resources":[]},{"id":"92","title":"Not interested in this topic","votes":"2","type":"x","order":"3","pct":3.7,"resources":[]}]["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"]["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"]350
    bottom200

    We use cookies to provide and improve our services. By using our site, you consent to our Cookie Policy.