/Etc/passwd & amp;/etc/shadow details 1. the passwd file is stored in the/etc directory. This file stores information about all user accounts, including the user name and password. Therefore, it is critical to the system. Run the following command to view the file: cat/etc.../etc/passwd &/etc/shadow. 1. the passwd file is stored in the/etc directory. This file stores information about all user accounts, including the user name and password. Therefore, it is critical to the system. Run the following command to view the file: The cat/etc/passwdPasswd file consists of many records, each of which occupies one row and records all information of a user account. Each record consists of seven fields separated by the colon ":". The format is as follows: username: password: User ID: Group ID: comment: home directory: shell field description: username uniquely identifies a user account, which is used when a user logs on. Password the password stored in the passwd file of this account is encrypted. The encryption algorithm in Linux is very strict, and the password is almost impossible to crack. Account theft usually uses special hacker program to construct countless passwords, and then uses the same encryption algorithm to encrypt them, and then compares them with this field. if they are the same, it indicates that the constructed password is correct. Therefore, we recommend that you do not use birthdays or frequently used words as passwords. they are almost vulnerable to hacking. Especially for systems directly connected to a large network, system security is particularly important. User ID, UID for short. In Linux, UID is used to identify the user rather than the user name. UID is an integer, and the user's UID is different from each other. Group ID user Group identifier, GID for short. Different users can belong to the same user group and have the same permissions. Similar to UID, GID uniquely identifies a user group. Comment is an annotation for the user account. it is generally the user's real name, phone number, address, etc., of course, it can also be empty. The home directory belongs to this account. after a user logs on, it will be placed in this directory, just like returning home. Generally, the main directory of the root account is/root, and the home directories of other accounts are all under the/home directory, with the same name as the user name. Login command: the command that the user executes after logon generally starts a shell program. For example, after you log on to the bbs account, you can directly access the bbs system because the bbs account's login command points to the bbs program and runs these commands automatically when the system logs on to the bbs. The system account system also has some default accounts, such as daemon and bin. These accounts have special purposes and are generally used for system management. Most of the passwords of these accounts are expressed by (x), which means they cannot be used during logon. 2. to enhance system security, the shadow file can also provide MD5 and Shadow security password services for users in Linux. If the MD5 and Shadow services are selected on the related configuration options during Linux installation, no matter which user is the passwd in the/etc/passwd file, all are "x", which means these users cannot log on. The system actually stores the real password data in the/etc/shadow file. The/etc/shadow file can only be viewed as root. The reason for doing so is actually very simple. during system design, the/etc/passwd file can be read by anyone, then those who are interested can use this file and use a variety of tools to try out the user or even root password by encrypting the Linux password, in this way, the entire system will be controlled by him, seriously endangering the security of the system and the confidentiality of user data. 3. the command pwconv generates/etc/shadow based on the/etc/passwd file. It moves all passwords from/etc/passwd to/etc/shadow. Pwunconv tries its best to restore the information in/etc/shadow to/etc/passwd.
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.