CentOS – How to Create an Unprivileged User

centosinit-scriptprivilegesusers

I want to create an unprivileged user to run my RhodeCode server and Celery daemon on a CentOS instance. I think the accepted definition of this is no home directory, login disabled, and no shell access? Looking over the man page for adduser I just don't see an intuitive method for doing this. Any suggestions are appreciated. Thanks.

Best Answer

From here (centos.org)

useradd (which is the actual binary the runs when you call adduser, it just behaves differently. See here about that.) has an flag -r which is documented as follows:

-r   Create a system account with a UID less than 500 and without a home directory

Which sounds like what you want to do.

Related Question