User Information file/etc/passwd
Use the command grep as shown below to view user vampire information
1 grep vampire/etc/passwd2 vampire:x:501:501::/home/vampire:/bin/bash
Information description
First field: User name (Vampire)
Second field: Password bit (x), just a placeholder, the real password is stored in the/etc/shadow file
Third field: UID (501) User id,0 for Super User, 1~499 system user, generally can't log in system, also called pseudo user, 500 and above ordinary user, Administrator created, generally can login
Fourth field: GID (501) User initial group ID, usually when adding a user, the system automatically assigns the
Fifth field: Some description information for GECOS users
Sixth field: $HOME (/home/vampire) User home directory, also known as the host directory, the normal user home directory at//, root user in/down
Seventh field: Shell (/bin/bash) after the user logs in
The shell is the command interpreter for Linux, and in/etc/passwd, in addition to the standard shell is/bin/bash, it can be/sbin/nologin
Initial group: Refers to a group of users with the same user name assigned to the user when the user is created, and the user group will be owned by users as soon as they log on to the system.
Permissions, the user's initial group can have only one
Additional groups: After a user is created, you can also have an administrator specify to join other groups and have the appropriate permissions for the corresponding groups. Additional groups can have more than one.
User description Information Gecos, you can use the finger command to view
1 [[email protected] ~]# finger Vampire 2 login:vampire Name: Span style= "COLOR: #008080" >3 Directory:/home/vampire Shell:/bin/bash 4 on since Sat may 13 10 : 11 (CST) on Pts/1 from 192.168 . 3.9 5 17 minutes 4 seconds idle 6 no mail. 7 No Plan.
Linux User information file/etc/passwd