create/delete groups in CentOS

You can create/ delete your own user groups in CentOS. To create a group, Use following command.

groupadd groupname

Example
groupadd tutorial_users

To add users to your newly created group, use following command. but you can add existing users to group using following command.

useradd -G group_name user_name

Example
useradd -G tutorial_users etutionlk

To add existing users to a group, use following command.

usermod -G group_name user_name

Example
usermod -G tutorial_users etutionlk

Use following command to delete group.

groupdel group_name

Example
groupdel tutorial_users

That's All !

0 comments:

Post a Comment

Ask anything about this Tutorial.