This is a guide I’m mainly written a personal how-to guide, but I hope it can help others.
|Official manual Page||useradd|
This is a fairly generic Linux-based command so it work across different Ubuntu editions and versions.
To create a new non-root system user called ‘account1’ with no home directory:
sudo useradd -r -s /sbin/nologin account1
|-r||create as a system account|
|-s||set default login shell|
|/sbin/nologin||create account without home or shell|