Linux User information file/etc/passwd

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.