How to change user's UID
  1. For example we want to modify the user tom's UID from e.g. 1001 to 2001
    • username: tom
    • current UID: 1001
    • new UID: 2001
  2. You can change the UID by editing /etc/passwd file, or use following command:
    • usermod -u 2001 tom
  3. You will then need to update the ownership of the user's home directory
    • chown -R tom /home/tom
  4. And you need to find all the files owned by the user and update their ownerships:
    • find / -user 1001 -print |xargs chown 2001

See Also

  1. Change UID
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License