Configuring user accounts
As I have hinted already, it is not good practice to run all programs as root since, if one is compromised by an outside attack, then the whole system is at risk and a misbehaving program can do more damage if it is running as root. It is preferable to create unprivileged user accounts and use them where full root is not necessary.
User names are configured in /etc/passwd. There is one line per user, with seven fields of information separated by colons:
The login name
A hash code used to verify the password , or more usually an
xto indicate that the password is stored in/etc/shadowUID
GID
A comment field, often left blank
The user's home directory
(Optional) the shell this user will use
For example, this creates users root with UID 0 and daemon with UID 1:
root:x:0:0:root:/root:/bin/sh daemon:x:1:1:daemon:/usr/sbin:/bin/false
Setting the shell for user daemon to /bin/false ensures that any attempt to log on with that name will fail.
Note
Various programs have to read /etc...