sudo useradd -r -s /usr/sbin/nologin svc-backup

Category: Administration

sudo useradd -r -s /usr/sbin/nologin svc-backup

Create a system service account

The -r flag creates a system account with a UID below 1000, and -s /usr/sbin/nologin blocks interactive login, the standard recipe for daemons. System accounts skip the normal home directory creation unless -m is added. Use adduser for interactive human accounts instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.