Advanced commands for Linux users and user groups

Source: Internet
Author: User

Lock account: Passwd-l account name

Passwd-l CLS

command to unlock an account: Passwd-u CLS

The user's password can be canceled: Allows the user to login without a password

Passwd-d CLS

Primary and secondary groups

A user can belong to more than one group at a time

------------------a primary group

------------------multiple satellite groups

Gpasswd-a CLS boss adds the user account CLS to the Boss Group, and the boss Group is a subordinate group of the CLS

Add a user to the satellite group

Users can switch their own group after logging in, if you have a group password, you need to enter the group password

NEWGRP user switch to satellite group by themselves

Delete a user's satellite group

Gpasswd-d CLS boss removes user account CLS from the Boss Group, and the boss Group is a subordinate group of the CLS

When you create a user, you specify both the user's primary group and the user's satellite group

Useradd-g group1-g Group2,group3

-G group1 is the primary group

After-G is a subordinate group

Modify Group Password: GPASSWD Group name

Advanced commands for Linux users and user groups

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.