how to use groupmems command with its examples

  • About groupmems: Administer members of a user´s primary group
  • Comes From :
  • Configuration Files:

       /etc/group           Group account information.
       /etc/gshadow         secure group account information

Examples:

1. To add a user to a group

$ groupmems -a mike -g SUPPORT
$ groupmems –add mike -g SUPPORT 

2. To delete/remove a user from a group

$ groupmems -d mike SUPPORT -g SUPPORT
$ groupmems –delete mike SUPPORT -g SUPPORT

3. To change the group name

$ groupmems -g SUPPORT

4. To remove the users from group

$ groupmems -p -g SUPPORT
$ groupmems –purge -g SUPPORT

5. To list the members of the group

$ groupmems -l -g SUPPORT
$ groupmems –list -g SUPPORT

Related Commands: chfn, chsh, passwd, groupadd, groupdel, useradd, userdel, usermod

One thought on “how to use groupmems command with its examples

Leave a Reply

Your email address will not be published. Required fields are marked *