Best Answer: How Can I Change Uid in Linux?
Contents How Do I Change My Uid in Linux? the Procedure Is Pretty Simple: Become Superuser or Get an Equivalent Role Using Sudo Command/Su Command. First...
Contents
How do I change my UID 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.
Must Read
How do I find my UID Linux?
Where to find stored UID? You can find the UID in the /etc/passwd file, which is the file that also stores all users registered in the system. To view the /etc/passwd file contents, run the cat command on the file, as shown below on the terminal.