Had to do this today on a rebuild of the home theater machine. Stupidly made theater the first user. That made it user 1000, group 1000. To make things consistent across my home network, I wanted to have my "myuser" user be uid and gid 1000 instead.
Basically followed the process described in this article.
Obviously, I needed to create myuser on the box and make them an admin (by adding to the "sudo" group), before I could do anything -- the theater user can't change its own ids.
Here's how I did it.
First, login as myuser and assign theater new ids and change file permissions accordingly:
usermod -u 1005 theater
groupmod -g 1005 theater
cd /
find . -user 1000 -exec chown -h 1005 {} \;
find . -group 1000 -exec chgrp -h 1005 {} \;
Then switch back to the theater user and re-assign its old ids to myuser (who had been created with user and group id 1001):
usermod -u 1000 myuser
groupmod -g 1000 myuser
cd /
find . -user 1001 -exec chown -h 1000 {} \;
find . -group 1001 -exec chgrp -h 1000 {} \;