How Do I Change the Primary Group Id in Linux?
Contents How Do I Change the Primary Group in Linux? Change User Primary Group to Set or Change a User Primary Group, We Use Option ‘-G’ with Usermod Command...
Contents
How do I change the primary group in Linux?
Change User Primary Group
To set or change a user primary group, we use option ‘-g’ with usermod command. Before, changing user primary group, first make sure to check the current group for the user tecmint_test. Now, set the babin group as a primary group to user tecmint_test and confirm the changes.
How do I change the group ID in Linux?
The procedure is pretty simple:
- Become superuser or get an equivalent role using sudo command/su command.
- First, assign a new UID to user using the usermod command.
- Second, assign a new GID to group using the groupmod command.
- Finally, use the chown and chgrp commands to change old UID and GID respectively.
7 сент. 2019 г.