Seven field explanations in the/etc/passwd directory
Account user name is also called login name
Password encrypted user name is typically x true user encrypted password under/etc/shadow file
ID of UID User
Group ID of the GID user
GECOS other information such as the user's full name, separated by commas
Home directory for user directory Users
Shell user's default shell
/etc/shells This directory for the current system legal shell
Explanation of 9 fields in the/etc/shadows directory
Login Name Login user name
Encrypted password encrypted passwords are generally MD5 encrypted
Encryption method:
Symmetric encryption: Use the same password for encryption and decryption.
Asymmetric encryption: Each password appears in pairs, one for the private key (secret key), and one for the public key
One-way encryption: Hash encryption, extract data signatures, often used for data integrity check.
Features: 1. Irreversible 2. Avalanche effect (small change, big change) 3. Fixed-length output
One-way encryption common way: Md5:message Digest mit 128-bit fixed-length output
Sha1:secure Hash algorithem American National Standards Association 160-bit fixed-length output
MD5 will add more impurities when encrypting the file even if the user has the same password MD5 the value is different
3. Date of last password changes the password time
4. Minimum password age password minimum usage time
5. Maximum password age password maximum usage time
6. Password warning Period password The number of days before expiration warning the user password is nearing expiration
7. Password inactivity period A few days after the expiry of the user can log in, but can only login not any other
Action, you can only change the password.
8. Account expiration date Specifies the user expiry time (not seeing if it expires) as long as it is not logged in at this time
9. reserved field reserved fields
/etc/group Group Field Description
Group name 2. Group Password 3. Group ID 4. Group members
Add Users Useradd or AddUser +name to add users
Change Password passwd + username to be modified This command is only available to root users other users can only modify their own user name
Adding user parameters that were added by default to the Useradd command in the/etc/default directory without a parameter specified by the user
Add Group: Groupadd + Group name to add
User Management commands:
Useradd Userdel usermod passwd chsh chfn finger ID chage
Group Management Commands:
Groupadd Groupdel Groupmod gpasswd
Rights Management Commands:
Chown chmod chgrp
This on the next time to learn to speak hehe!!! To this end take over! OY
Linux User and permissions detailed (2) (note)