

The same UID, neither action is wise from a security point of view. Although the user name can beĬhanged on this account and additional accounts can be created with The UID of 0 has a special role: it is always the root account (i.e., However, it isĪdvisable to use values only up to 65,534 in order to maintainĬompatibility with systems using older kernels or filesystems that can That can represent values from zero to 4,294,967,296. In the Linux kernels 2.4 and above, UIDs are unsigned 32-bit integers Group ID (GID), which by default is equal to the UID for all ordinary The third field contains the UID, and the fourth field contains the User-specific information, in the /etc/passwd file. UIDs are stored, along with their corresponding user names and other Each user is identified to the systemīy its UID, and user names are generally used only as an interface for Some info on this here:Ī user ID (UID) is a unique positive integer assigned by a Unix-like This is because on many linux systems, usernames above 1000 are reserved for unprivileged (you could say normal) users.

if the third field (the User ID number) is larger than 1000 and not 65534, the first field (the username of the user) is printed.This should get, under most normal situations, all normal (non-system, not weird, etc) users: awk -F'' '' /etc/passwd To add a user to the sudo group: adduser username sudoĪnd, of course, see also: man adduser, man useradd, man userdel. To change the details for a user (for example real name): sudo chfn username To change the shell for a user: sudo chsh username
#Add sudo password#
To change the password for a user: sudo passwd username To modify the username of a user: usermod -l new_username old_username Please use with caution the above command! To modify Then you may want to delete the home directory for the deleted user account : sudo rm -r /home/ username To remove/delete a user, first you can use: sudo userdel username

See also: What is the difference between adduser and useradd? To remove/delete To add a new user you can use: sudo adduser new_username Some more useful user-management commands (also limited to local users): To add To list all users capable of authenticating (in some way), including non-local, see this reply. To list all local users you can use: cut -d: -f1 /etc/passwd
