[CentOS] UID/GID CentOS 6 to CentOS 7

Thu Oct 22 19:12:11 UTC 2020
Kenneth Porter <shiva at sewingwitch.com>

On 10/22/2020 6:06 AM, Simon Matter wrote:
> In the end I decided to rearrange all users to new UIDs/GIDs and converted
> all storage with a script.

I'm rsyncing to an RH8 box for backup (it will eventually become the 
production box), and rsync maintains usernames even when the numeric IDs 
are different. So I cobbled together some Python scripts to migrate the 
users and groups from my RH7 boxes (which still has some IDs below 1000) 
to my RH8 box. I decided to export all the passwd files into json and 
then import them with a second script on the new box. I'm new to Python 
so this gave me motivation to learn a bit of it. Patches welcome.