Basic Linux Learning (7)

Source: Internet
Author: User

Seventh chapter-User and user group Management one. User Profile 1. User Information file/etc/passwd:

(1) User Management Introduction: So the more server security requirements of the server, the more need to establish a reasonable level of user rights and server operating norms.

In Linux, user information is viewed and modified primarily through user profiles. (2)/etc/passwd:

(3) Initial and additional groups:

(4) What the shell is:

2. Shadow file/etc/shadow:

(1) Shadow file/etc/shadow:

(2) time stamp conversion:

3. Group information file/etc/group and group password file/etc/gshadow:

(1) Group information file/etc/group:

(2) Group password file/etc/gshadow:

Two. User Management related files

(1) User's home directory: normal User:/home/user name/, owner and owning group are this user, permission is 700;

Superuser:/root/, owner and owning group are root users, permissions are 550

(2) User's email:/var/spool/mail/User name/

(3) User Template directory:/etc/skel/

Three. User management commands 1. User add Command useradd:

(1) Useradd command format:

(2) Add Default User:

(3) Specify options to add Users:

(4) User default value file:

2. Modify User password passwd:

(1) passwd command format:

(2) Check the status of the password:

(3) lock user and unlock User:

(4) Use a string as the user's password:

3. Modify user information Usermod Modify user password status Chage

(1) Modify user information Usermod:

(2) Modify user password status chage:

4. Delete user Userdel, user switch command su:

(1) Delete user userdel:

(2) Manually delete the user:

(3) View User id:

(4) Switch user identity su:

Four. User group management Commands 1. Add a user group:

2. Modify user groups:

3. Delete user groups: (no initial user allowed, allow additional users to exist)

4. Add the user to the group or remove it from the group:

Basic Linux Learning (7)

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.