[CentOS] UID/GID migration vom C6 to C8

Mon Nov 15 22:40:07 UTC 2021
Kenneth Porter <shiva at sewingwitch.com>

On 11/15/2021 6:48 AM, Simon Matter wrote:
> I've created a script which uses `chown' to recursively change UIDs and
> GIDs. I don't remember exactly but I think I made it run for every user in
> parallel and it finished quite fast considering the fact that it had to
> traverse the whole storage consisting of millions of files.
> I could then later just rsync everything to the new box without ant
> UID/GID conversion.

rsync by default copies by name, not UID/GID. So you can let the new 
system assign numbers based on the new limits and let rsync do the 
conversion.

You could also just keep the old numbers. AFAIK, no numbers in the 
500-999 range have been globally registered. Create your users with 
their old IDs on a minimal system before installing any optional 
packages that might try to allocate a system UID from the same range. 
Then the optional packages will allocate from any "holes" in that range.

Other UID ranges you want to dodge are listed here:

https://en.wikipedia.org/wiki/User_identifier