How can I transfer the root account on my computer to a regular account?

Joined
Jul 25, 2012
Messages
2
Reaction score
0
Points
1
Back in October 2010, I installed a Java update or something on my regular account, and it broke the account for some reason. I had no other account to use except for the root user that I enabled previously (just for testing). I logged into it and used it as my regular account, checking every so often to check if my regular account fixed itself. Sadly, it didn’t (at the time), but after a while, I upgraded my computer to Snow Leopard (I was previously running Leopard), I found that my old account finally fixed itself. Immediately, I attempted to copy over all of my files from the root account to the other account. I went onto the account, and it seemed to be a fresh account, so I assumed that it didn’t register the account files as legitimate and I guess it made it into a new account. I gave up after fiddling with it for a bit. To this day, I’m still using the root user as my main account, but a lot of things are broken (like Spotlight, Mail search, some other things) and I’d just like to know a clean way I could easily transfer all of the stuff from the root user to my old account (including all of the Library files and such). Please don’t say “You shouldn’t have used the root user because it’s really dangerous,” or whatever. I’ve been responsible with it for almost 2 years and I don’t think I could’ve made a new account in the first place, not like I can change the past and make it so I made a new account. Thanks for any help.
 
OP
C
Joined
Jul 25, 2012
Messages
2
Reaction score
0
Points
1
UPDATES:
I posted my question to Apple Discussions and got a response. This is what someone said.

Its doable with Terminal. Log into your new userfolder in the /Users/ folder and open Terminal and say:
Code:
whoami
This is the owner of your newly transferred files.

Log into your root account and Launch Terminal. You will use the scp (secure copy) command to copy your files over to the new userfolder, replacing PathToNewFolder with the path to your new folder:
Code:
cd /PathToNewFolder
scp -r /private/var/root/* .
The copied files will all have ownership of root account, so you will then set ownership of all the files to your new username that you remember from above, replacing "NewName" with your new username:
Code:
$USER=NewName
find . -exec chown $USER:admin {} \;
find . -type d -exec chmod 750 {} \;
find . -type f -exec chmod 640 {} \;
 
chmod 755 Library
find Library -type d -exec chmod 755 {} \;
find Library -type f -exec chmod 600 {} \;
 
chmod 755 Library/Autosave\ Information Library/Application\ Support Library/Keychains Library/Application\ Support/Terminal
chmod 644 Library/Preferences/QuickTime\ Preferences Library/Keychains/* Library/Favorites/* Library/Caches/com.apple.preferencepanes.cache Library/Caches/com.apple.preferencepanes.searchindexcache
 
chmod 755 Public ~/Sites
chmod 733 Public/Drop\ Box
find Sites -type d -exec chmod 755 {} \;
find Sites -type f -exec chmod 644 {} \;
Then you can login to your new account with all your stuff hopefully intact. If anything doesn't work respond here and it can be fixed.

It seems to have transferred all the files. However, no preferences were transferred and I was wondering if there was a way to transfer them.

EDIT: I did it again and it worked.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top