This is just a sharing post. My company completed a major step in our divestiture from RTX. Shout out to @ShawnLothrop and the Boston Engineering team for their help. After a clone/split/delete project, it was time to lift and shift Windchill to our new network. The rehost was a snap with a good architecture setup suggestion from BE (running with a proxy server). So, one of the things we had to do was update the LDAP and Oracle tables since each user was getting a new userid and email address.
1. Updating WindchillDS LDIF: This was done with an LDIF export and "sed" command. Looks like something like this:
sed -e "firstname.lastname@example.orgemail@example.com/" -e "s/joe.schmo/jschmo777/" -e "firstname.lastname@example.orgemail@example.com/" -e "s/jane.doe/jdoe523/" ... <sourceLDAP_5_28_2021_orig.ldif>sourceLDAP_5_28_2021_new.ldif
Key was to do the email FIRST then the username. This will update all occurrences which takes care of group memberships and user DNs. I was able to use Excel to string together a massive command (31k characters) and paste that into a putty shell. Runs in a few seconds and entire LDIF is updated. "..." means rinse/repeat for all users.
2. Updating WTUSER table (backup first)
UPDATE WTUSER SET NAME ='jschmo777' WHERE NAME='joe.schmo';
UPDATE WTUSER SET EMAIL ='firstname.lastname@example.org' WHERE EMAILemail@example.com';
Easy to construct in Excel and paste as script into SQL utility.
3. Updating REMOTEOBJETID (backup first)
UPDATE REMOTEOBJECTID SET REMOTEOBJECTID='uid=jschmo777,ou=people,cn=administrativeldap,cn=windchill_11.1,o=ptc' WHERE REMOTEOBJECTID='uid=joe.schmo,ou=people,cn=administrativeldap,cn=windchill_11.1,o=ptc';
Same deal and this will ensure that the LDAP LDIF changes match the database.
Solved! Go to Solution.