Referencing the answers to this question, they give nifty one-liners to create such a user such as:
sudo adduser --system --no-create-home --group mightydog
After this, can user mightydog log on? What is his password?
Referencing the answers to this question, they give nifty one-liners to create such a user such as:
sudo adduser --system --no-create-home --group mightydog
After this, can user mightydog log on? What is his password?
There's no harm in simply trying it out. On my system (16.04), this resulted in a user with locked password (*) and no valid login shell (/bin/false), as can be seen from its /etc/passwd and /etc/shadow entry:
# grep mightydog /etc/passwd
mightydog:x:128:138::/home/mightydog:/bin/false
# grep mightydog /etc/shadow
mightydog:*:17610:0:99999:7:::
So no, it does not have a password, and it also can not log in by any other means (like SSH keys, or using sudo -u) due to the /bin/false shell.