Passwd and shadow files under etc

Source: Internet
Author: User
Article Title: passwd and shadow files under etc. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Before changing the File Permission, you must first know the owner and owner group information under the File Permission!

User Information ----/etc/passwd

User Password ---/etc/shawdow

User group information ---/etc/group

User Information and user passwords are opened separately. Of course, they are for security purposes!

[Contact two viewing commands:

Head-n/etc/passwd view the first n rows of passwd

Tail-n/etc/passwd view the last n rows of passwd

]

Tail-1/etc/passwd to view the last line

Sabayon: x: 86: 86: Sabayon user:/home/sabayon:/sbin/nologin

Separated by colons:

Username: Password (not displayed): UID (user number): GID (group number): Note: Home Directory: Login shell

The annotations can be ignored. I don't know much about the meaning, and I can't explain them clearly on the Internet, but I can ignore them. I hope some seniors can give some advice!

Login to shell this user sabayon set is not allowed to log on locally/sbin/nologin

Here, root is the user of the linux God, which can be compared as follows:

Root: x: 0: 0: root:/bin/bash

Tail-5/etc/shadow

Sabayon :!! : 14844: 0: 99999: 7 :::

Similarly, the colon is the dividing line and is divided into nine fields:

① User

② Password ,! Indicates that no password is set. $ indicates that the password is set.

③ The number of days the password was modified since January 1, January 1, 1970 (the first year of the computer)

④ How long will it take to change the password (0 indicates that the password can be changed at any time)

⑤ Password expiration time, that is, you must modify the password on that day, and the system forces you to modify the password. 99999 represents a long time, and it is estimated that the password will not expire in the lifetime!

⑥ Warning days of expiration time, reminding you to expire 7 days later

7. The password expires and the system automatically disables the number of days for the account.

Indicates the number of days that the account has been disabled

Slave with backup

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.