Linux User and Group management

Source: Internet
Author: User

This is the user and group management knowledge Point, do not want to see the text on the video bar, or video-based, text for the memo

Video link:

Project 1 User Management 1. Create a new user User01, set its home directory to/home/user01:
#useradd –d/home/user01-m User01

2. Look at the last line of the/etc/passwd file to see how it is logged.

  

cat/etc/passwd

3. Look at the last line of the file/etc/shadow file to see how it was recorded.

Cat/etc/shadow

4. Set password for user user01: #passwd user01

  

5. Review the last line of the file/etc/shadow file again to see what's changed.

6. Use the User01 user login system to see if you can log in successfully.

7. Lock User user01: #passwd-L User01.

  

8. Look at the last line of the file/etc/shadow file to see what's changed.

9. Use the User01 user login system again to see if you can log in successfully.

10. Unlock user user01: #passwd-u User01

11. Change the user User01 account name to User02: #usermod –l user02 User01.

12. Look at the last line of the/etc/passwd file to see what's changed.

13. Delete User User02.

Sub-project2. Management of the group 1. Create a new group, stuff: #groupadd stuff.

2. Look at the last line of the/etc/group file to see how it is set up.

3. Create a new account User02 and set his start and subordinate groups to stuff: #useradd –g stuff–g stuff User02.

4. Look at the last line in the/etc/group file to see what's changed.

5. Set the group password to group stuff: #gpasswd stuff.

6. Delete User User02 in group stuff: #gpasswd –d user02 stuff.

7. Review the last line in the/etc/group file again to see what's changed.

8. Delete the group stuff.

Linux User and Group management

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.