Some simple commands for Linux (iv)-User and group account management

Source: Internet
Author: User

The Linux operating system is a multi-user operating system that allows multiple users to log on to the system and use resources at the same time. Each user's files, processes, tasks, and work environment are differentiated according to the account, making every user work undisturbed

1. Files to save user information:/etc/passwd

2. Save the user password file:/etc/shadow

3. Save the user group's files:/etc/group

4. Save the user group password file:/etc/gshadow

5. User profile:/etc/default/useradd

6.linux User category: Superuser (root,uid=0) average user (UID 500 to 60000) pseudo-user (UID 1 to 499)

7. Add user command: Useradd [-options] Username option:-u (Specify user uid)-g (Specify user-owned group name GID)-g (Specify multiple groups, with, separate)-C (user description)-e (Expiration Time)

Example: Useradd Zheng Zheng User created successfully, but no password

8. Add a password to the user: passwd user name

9. Modify user command: Usermod [-options] Option:-L (Modify user name)-G (Add Group)-g (Add multiple groups)-L (lock user account password)-U (unlock)

10. Delete User: Userdel-r (delete the directory while deleting the user)

11. Add Group: groupadd-g (Specify GID)

12. Modify Groups: Groupmod-n (change group name)

13. Delete Group: Groupdel

14. The first way of permission:

15. Second way of modifying permissions:

Some simple commands for Linux (iv)-User and group account 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.