Linux User Management-user group account management

Source: Internet
Author: User

1. User group account configuration file

------/etc/group

Field 1: User group name

Field 2: User group password, General Linux User Group No password, default is null or X

Field 3:gid

Field 4: List of member users

------/etc/gshadow

Field 1: User group name

Field 2: User group password, General Linux User Group No password, default is null or X

Field 3: List of group Administrators

Field 4: List of member users

2, group account additions and deletions to check

1> Add group account------Groupadd

Format: Groupadd [-G GID] Group name

2> setting Group members------GPASSWD

Format: gpasswd [options] Group name

Common options

-A defines the group Administrator list

-a adds a group member and can only add one at a time

-D Deletes a member of a group, deleting only one at a time

-M defines the group members, the list of users, can be set multiple, with ', ' separated, each setting will overwrite the previous settings

Gpasswd-m "" User group name------> Empty a group

3> Delete Group account------Groupdel

Format: Groupdel Group name

* * Deleted target group cannot be user's base group

4> set group password, toggle Basic Group

Device Group password: GPASSWD Group name

Remove device group password: GPASSWD-R Group name

Toggle Base Group: NewGroup Group name

Note: If the target group is one of the current user public groups, no password is required, otherwise the password needs to be verified

Linux User Management-user 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.