My system has a lot of users, I'v never created, like mysql
or tomcat
. These users have no home directories inside /home
Obviously, a daemon programs run under these users.
What is the term for such users?
How to create my own user of such kind? For example, I wish to create a user for deluged
, but I don't want to create and remember a password for it and also don't want to allow somebody to login with this user from console.
How to accomplish?
Best Answer
You can give useradd the
-r
or--system
flags to tell it you want such a user (a system user as you already called it). Here's an excerpt from my system's man page:Though you can make any user unable to login from the console by setting their shell to
/bin/false
or/sbin/nologin
or something like that. You can do that with-s
touseradd
or you can change an existing user withchsh -s /sbin/nologin
for example.