User Accounts and Groups Management on Linux
User Accounts and Groups
On Red Hat Enterprise Linux, information about user accounts and groups are stored in several text files within the /etc/ directory. When a system administrator creates new user accounts, these files must either be edited manually or applications must be used to make the necessary changes.
root:x:0:0:root:/root:/bin/bash
username:password:userid:groupid:fulluser name:user home directory:user shell
..........................................................................................................................
/etc/passwd
The /etc/passwd file is world-readable and contains a list of users, each on a separate line. On each line is a colon delimited list containing the following information:
1 Username — The name the user types when logging into the system.
2 Password — Contains the encrypted password (or an x if shadow passwords are being used more on this later).
3 User ID (UID) —The numerical equivalent of the username which is referenced by the system and applications when determining access privileges.
4 Group ID (GID) — The numerical equivalent of the primary group name which is referenced by the system and applications when determining access privileges.
5 GECOS —Named for historical reasons, the GECOS[25] field is optional and is used to store extra information (such as the user's full name). Multiple entries can be stored here in a comma delimited list. Utilities such as finger access this field to provide additional user information.
6 Home directory —The absolute path to the user's home directory, such as /home/juan/.
7 Shell —The program automatically launched whenever a user logs in. This is usually a command interpreter (often called a shell). Under Red Hat Enterprise Linux, the default value is /bin/bash. If this field is left blank, /bin/sh is used. If it is set to a non-existent file, then the user will be unable to log into the system.
...........................................................................................................................
1. root:x:0:0:root:/root:/bin/bash ---------------------------------------default user id ----- 0
2. debashis:x:500:500:Debashis Acharya:/home/debashis:/bin/bash --------- default user id ----- 500
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Comments
Post a Comment