Experience of Linux learning from brother-in-the-Birds (--linux) account management and ACL permission setting

Source: Internet
Author: User

1. This chapter mainly introduces the related user account management of Linux. Each login will get at least two IDs, one user ID (user id,uid) and one group ID (group Id,gid).

2. What did the system do for you when you entered your account number and password?

1) First look for/ETC/PASSD inside whether there is your input account, if not on the jump, if there is the account corresponding UID and GID read out, in addition to the account home directory and Shell settings also read out

2) Check the password list. At this point, Linux will enter the/etc/shadow to find the corresponding account and UID, and then check the password you just entered and the password is the same

3) If all is OK, enter the shell control stage.

3. We can take a look at the information in passwd:

A total of 7 information:

1) Account name: Account number, corresponding UID

2) Password: Because the password is placed in the shadow, so only the x is shown here

3) UID: User ID, 0 means system administrator, 1-499 is System account, 500-65535 indicates login account is available.

4) GID

5) User Information Bar description

6) Home Directory

7) Shell

4. Take a look at the contents of shadow:

There are 9 fields:

1) Account name

2) password

3) Date of recent password change

4) Number of days for which the password cannot be altered

5) Number of days the password needs to be re-changed

6) The number of days before the password needs to change the period of warning

7) When the password expires, the account has a wide time limit.

8) Account Expiration date

9) Reserved

5. If the password of the general user has forgotten, switch to root identity and then re-assign the value, if the root password is more troublesome, need to enter the single user mode (INIT1), the system will actively give root privileges of the Bash interface, at this time to passwd change the password can be or use Live CD boot after mount root directory to modify/shadow, will be inside the root password field empty, and then restart the root without password login, login and then passwd instructions to set the root password.

6. The following information is stored in the/etc/group:

There are 4 fields:

1) Group name

2) Group password

3) GID

4) account password supported by this group

7. We can use the groups command to effectively and support group observation

Added User: Useradd,useradd user1,useradd-u 700-g users Bird

Delete User: Userdel

8. Set the password to use passwd on the line, passwd user is to set the user password

9. List user's detailed password parameters: Chage-l user

10. In addition to adding and removing users, Linux also provides instructions to fine-tune account-related data, which is usermod.

Usermod-c "User test" User: Add user test to User's description field

Usermod-e "2009-12-31" User: Disable user password early 2009-12-31

With home directory, delete user:userdel-r user.

11. Another important instruction is that Finger,finger can access many user-related information, most of which are information in/etc/passwd, such as finger user's access to user information, The finger can display the user and logon hours currently logged on the system.

Similar groupadd and Groupmod will not speak.

Su-can change the identity to root, but requires a password, the sudo instruction executes root instruction string, switches to the normal user to Su-user.

13. If you want to know the current user login on the system, you can use W or who to check, if you want to know the last login time for each account, use Lastlog, are directly input can be seen.

Experience of Linux learning from brother-in-the-Birds (--linux) account management and ACL permission setting

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.