Linux: users and groups (four)

User group management commands:

 

To add a group: groupadd [options] group name

        -g GID: Specifies the group ID

 

Modifying User Groups: groupmod [Options] group name

      -g GID: Modify Group ID

      -n group name: Modify the group name

  groupmod -n qwe asd: asd group of the group name changed to qwe

  

Delete a user group: groupdel group name

  To delete a user group, the user group can not have the initial user exists.

 

Add the user name to the user group:

  gpasswd [Options] group name

    Options:

        -a Username: the user to the group.

        -d Username: the user to delete from the group.

    Group added to it, as an additional user groups.

 

 

    

Guess you like

Origin www.cnblogs.com/rtczza/p/11723500.html
Recommended