Hi,
OK, as I had to get this ticket closed, here's what I ended up doing. Note that I changed usernames to something else, but I made sure they have the same length (you'll see why)
Initially I figured to go down the backup & restore path then noticed the change_username.sh and figured that it would probably mess up less things.
For the backup/restore path I had already created a new user "abcdefgh01", so I figured to delete that user again.
Then I tried to run the change user name script:
Code:
# ./change_username.sh oomipo abcdefgh01
Killing User processes:
usermod: user oomipo is currently used by process 18346
Cannot find user abcdefgh01
Uhh what? Yes user abcdefgh01 shouldn't exist, it's the new user?? As I had just created and then deleted it, I figured to change a tiny detail and try again.
Code:
# ./change_username.sh oomipo abcdefgh02
Killing User processes:
groupmod: group 'oomipo' does not exist
swapping 'oomipo_xbxo1'@'localhost' with 'abcdefgh02_xbxo1'@'localhost'
swapping 'oomipo_p5l61'@'localhost' with 'abcdefgh02_p5l61'@'localhost'
swapping 'oomipo_absentry'@'localhost' with 'abcdefgh02_absentry'@'localhost'
Error updating 'oomipo_absentry'@'localhost' to 'abcdefgh02_absentry'@'localhost' in mysql.user: String 'abcdefgh02_absentry' is too long for user name (should be no longer than 16)
swapping 'oomipo_absusr17'@'localhost' with 'abcdefgh02_absusr17'@'localhost'
Error updating 'oomipo_absusr17'@'localhost' to 'abcdefgh02_absusr17'@'localhost' in mysql.user: String 'abcdefgh02_absusr17' is too long for user name (should be no longer than 16)
Swapping oomipo_xbxo1 to abcdefgh02_xbxo1
Dumping+restoring oomipo_xbxo1 -> abcdefgh02_xbxo1...
Database has been renamed successfully: oomipo_xbxo1 -> abcdefgh02_xbxo1
Updating mysql.db...
Swapping oomipo_p5l61 to abcdefgh02_p5l61
Dumping+restoring oomipo_p5l61 -> abcdefgh02_p5l61...
Database has been renamed successfully: oomipo_p5l61 -> abcdefgh02_p5l61
Updating mysql.db...
Swapping oomipo_abs17db to abcdefgh02_abs17db
Dumping+restoring oomipo_abs17db -> abcdefgh02_abs17db...
Database has been renamed successfully: oomipo_abs17db -> abcdefgh02_abs17db
Updating mysql.db...
Swapping oomipo_absentry to abcdefgh02_absentry
Dumping+restoring oomipo_absentry -> abcdefgh02_absentry...
Database has been renamed successfully: oomipo_absentry -> abcdefgh02_absentry
Updating mysql.db...
#
So I still have some databases with the old usernames, because they are too long. I'm not sure how bad that is. For the moment, I figured to live with it.
What did happen however was that all of my sites were down because php-fpm70 had broken.
Code:
service php-fpm70 start
cannot get gid for group 'abcdefgh02'
The php-fpm70 service was now looking for group abcdefgh02 -which did not exists- whereas all the files in the path are using group abcdefgh01 ??? Very weird, it seems to me that if you create a new user and then delete it, that it does not delete the group. What is more peculiar is that the user ended up using that group. It really does not make sense to me.
I ended up just creating the group 'abcdefgh02' and added the user to that group, after that I could restart php-fpm70 again.
With that I now had to fix the websites database and logins and things are slowly getting back to normal.