Linux User and permissions detailed (2) (note)

Source: Internet
Author: User
Tags asymmetric encryption

Seven field explanations in the/etc/passwd directory

    1. Account user name is also called login name

    2. Password encrypted user name is typically x true user encrypted password under/etc/shadow file

    3. ID of UID User

    4. Group ID of the GID user

    5. GECOS other information such as the user's full name, separated by commas

    6. Home directory for user directory Users

    7. Shell user's default shell


/etc/shells This directory for the current system legal shell


Explanation of 9 fields in the/etc/shadows directory

    1. Login Name Login user name

    2. 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

    1. 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)

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.