Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to create user with least privileges. Without home, without rights, without shell. How to do that? When I call useradd it creates user with home

share|improve this question
3  
Did you even look at the manual for useradd? –  Cylindric Dec 16 '11 at 16:33
    
I like the question. Even if some assume the problem so simple that a man useradd would suffice, I can imagine that there is more involved here and actually implicitly asked for. I cannot understand the downvote. –  humanityANDpeace Dec 17 '13 at 11:49
add comment

1 Answer

up vote 6 down vote accepted

Per the man page, this command will create a user with no home directory, and no shell.

 useradd -M -s /bin/false <desired username>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.