adduser

adduserで--systemと指定すると、systemユーザを作ることができる。systemユーザっていうスキームがあるんですね。付与されるUIDの範囲以外に何か違うんだろうか。


adduser will choose the first available UID from the range specified for system users in the configuration file (FIRST_SYSTEM_UID and LAST_SYSTEM_UID). If you want to have a specific UID, you can specify it using the --uid option.


By default, system users are placed in the nogroup group. To place the new system user in an already existing group, use the --gid or --ingroup options. To place the new system user in a new group with the same ID, use the --group option.


A home directory is created by the same rules as for normal users. The new system user will have the shell /bin/false (unless overridden with the --shell option), and have logins disabled. Skeletal configuration files are not copied.

併せて、--no-create-homeを指定するとhomeディレクトリを作らない。--systemと併せて--groupを指定すると同じ名前でグループを作成してくれるので、バックグラウンドで動かすプロセスの実行ユーザを作成する場合、

 adduser --system --group --no-create-home ユーザ名(グループ名)

で良いと。