Disclaimer: I am not responsible for any damage you may cause to your system. Make sure you understand how to copy your files before locking your self out of an account or inadvertently deleting a profile that you need
I had a situation where I had to move a home directory (in-tact) from one user to another. Permissions became very inconsistent since the previous user never fully migrated his profile from his predecessor. To clean up the mess I did the following (works on Snow Leopard/Lion):
Enabled Root User
Go to your System Preferences and under system click on Accounts
Then click on Login Options, and to the right you will see Network Account Server, click Join.
A window will pop-up, continue by clicking on Open Directory Utility …
This will open the Directory Utility, make sure the small lock on the bottom left is in the Unlocked position, if not, click on it and enter your admin password. Once it is unlocked, go to the top menu, click Edit > Enable Root User
Once you Enable Root User, you will be prompted to enter a password for the Root.
Backup up both profiles
Now that Root is enabled, log in under a separate Admin account – Make sure you are not logged in as one of the users you are moving.
Add the new user to your system. (System Preferences > Accounts > +)
Once you have added the new user to your system, open up Terminal and become root by typing “su – root” without the quotes.
Once you are done, make a copy of both the new user and the old user profile directory e.g. /Users/NewUser/ and /Users/OldUser. Compare the newly created backups with the old directories to make sure the structure is the same.
Move the profile to the new user
Now that you have compared the directories, you are ready to move everything over to the new user. Remove the original (not the newly created backup) /Users/NewUser.
Now move the old user to the new user e.g. mv /Users/OldUser /Users/NewUser
Recursively change permissions
I had a minor issue with syntax, but after a little trial and error I did the following:
From /Users/ I typed chown -R NewUser *
This changes the permissions(ownership) from OldUser to NewUser.
Log in and Test your new permissions
Log out of the current profile and log in under NewUser and test the permission by opening up any documents or desktop elements.