How Do I Change My Uid and Gid in Linux?
Contents How Do I Change My User Id and Group Id in Linux? the Procedure Is Pretty Simple: Become Superuser or Get an Equivalent Role Using Sudo Command/Su...
Contents
How do I change my user ID and 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 г.
Must Read
How do I change the primary GID in Linux?
To change the primary group a user is assigned to, run the usermod command, replacing examplegroup with the name of the group you want to be the primary and exampleusername with the name of the user account. Note the -g here. When you use a lowercase g, you assign a primary group.