Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


Renaming my home directory trashed my Mac?

I have a Mac OS X iBook G4 ver. 10.3.9. Recently, I don't know what came over me, but I wanted to change my "name" on my computer. So, what I did was open Finder, click on my name (beside the house icon) and clicked File-Get Info. I then simply changed my name in the box that showed up under "Name & Extension". I did not realize what havoc this would cause on my computer (I did not get any "Are you sure?" warning message or anything). Even though I had changed my name, I had NOT created another account. All my old files were then put under my old name, and I eventually found these files. However, all of my programs reset themselves. I lost my emails, all my personal settings, everything. It was as if I was opening the programs up again for the first time. This was still the case even after I had switched my name back to the original name.

Question: What did I do? Why was it so easily done? How can I get my original settings back without having to reset them all manually?


Dave's Answer:

Ouch. I never really thought about the implications of renaming your home directory in the Mac world, but since Mac OS X is running atop Unix (FreeBSD, to be specific) this is a very bad thing.

The biggest problem is that when you next reboot your system, it'll complain that you no longer have a home directory (since it's probably looking for something like /Home/taylor but you've ingeniously renamed it /Home/dave) and might either refuse to let you log in or drop you in a generic directory like / or /tmp.

To fix this, you need to restore the name of the existing directory, not move files into a new directory, and then you'll have the magic set of preference and configuration files you seek, all in your Library/Preferences folder within your home directory.

(Actually, Mac applications aren't that well behaved as a group, so some actually use subdirectories in your Documents folder (like Microsoft apps, which use "Microsoft User Data" within "Documents") or elsewhere to store preferences and configuration options too.

If renaming your old home directory doesn't fix it, then dig around and see if you can identify where the preference files have gone, because they're what controls whether an app thinks you've used it and tweaked it or not.

In terms of why was it so easy to do, well, that's why I think it's a good idea to run on a day-to-day basis as a regular, not admin user. By being an administrative user, you get greater powers and as the proverb goes, absolute power corrupts. Only this time it was your hard disk that was corrupted...

In the future, when you want to rename your account or, more sensibly, create a new account, your best bet is really to use the Accounts tool, accessible from Apple --> System Preferences --> Accounts:

Setting Account Preferences in Mac OS X

Notice the "+" on the lower left there? Click on that and you can add new accounts to your heart's content. Also notice that Linda's account on this system is listed as "standard", that is, not an administrative account. It's safer.

Good luck to you!


More Useful Mac OS X Help Articles:
✔   Audacity can't find LAME library, I can't save Mp3?
Hey Dave. I read your article Audacity can't save mp3 audio files and am still puzzled because I downloaded the LAME Mp3 converter...
✔   How to remove Dashboard as a "space" in Mac OS X Spaces?
I'm a big fan of the Spaces utility in Mac OS X that lets me have multiple virtual screens [see Set Up Mac...
✔   Best place to buy a cheap MacBook laptop?
Hi Dave. I am looking for two gently used MacBook laptops for my teen daughters. Personal computers would greatly facilitate their studies as...
✔   File too big error copying to USB flash drive on my Mac?
I'm baffled. I have a 16GB Kingston USB flash drive that I use on my Mac system and I'm trying to copy a...
✔   Stealth image capture photo from webcam on my Mac?
Someone sneaks into my cubicle while I'm at lunch and takes candy out of my desk. Petty, but stupid too. I want to...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  




Categorized: Mac OS X Help   (Article 5912, Written by )
Tagged: mac os x, user accounts
Previous: Apple iPod Nano won't turn off? Help!
Next: What's the Amazon Associates Sponsored Links Program?




Reader Comments To Date: 13

Michael Henley said, on February 7, 2006 8:50 PM:

For info on how to change the short user name (which is the greyed out box in the screen cap and the name used for the home folder) check out the excruciating process described by Apple:

http://docs.info.apple.com/article.html?artnum=106824

...or this donationware app:

http://www.versiontracker.com/dyn/moreinfo/macosx/23494

Michael Savinon said, on April 2, 2006 12:43 PM:

In the article: "Renaming my home directory trashed my Mac?"

I did the same foolish thing the individual did. I renamed "mycomputer" to "Main" After rebooting, I got just a plain desktop and only the bare fundamentals on the dock. The "mycomputer" icon is still there but when I click all my files are all gone. When I go to the main directory called "Cube" and open the users folder, I can find the "mycomputer" iconr and a short cut icon titled "Main" When I click "Main", all my missing files are there including the original preferences folder. I tried to take this preferences folder and copy the contents to the "mycomputer" preference folder but all that creates upon reboot is another "mycomputer" folder called "mycomputer 1"

You mentioned to "restore the name of the existing directory"
but I am totally lost on this....I cannot rename it because it is still the same name (mycomputer) that it was originally before I created this huge problem.

How can I get everything to return to what it was....unbelievable

TIA

Michael

GBB said, on January 29, 2007 7:49 PM:

I had all my music loaded on a PC and backed up on an external drive. The computer crashed and as fate would have, the external drive crashed. All my music is loaded on an iPod with 30gb drive, but the iTunes software will not let me copy it onto the library in my new computer. Suggestions?

Alicia said, on January 30, 2007 2:33 PM:

I did the same stupid thing!

In my case, I MOVED the little house out of the sidebar, and it went "poof" now all my personal settings are gone!!!

I know they are still on the computer- but I can't find them!!!
My photoshop preferces are gone etc.

I don't know how to move all my files back.

help!

William said, on February 21, 2007 8:12 AM:

Hello, I managed to mess up my Home folder rename and then some- Changed folder name, THEN accidentally logged out- Now I cannot boot OSX- It goes directly to terminal BSD. Is there a way to add a new user in BSD? I tried to archive and install but my system disc is shot. I have tried a bunch of ideas but nothing seems to work. Is there a string command to create a new user (which I believe is tyhe easiest way toi fix it?)

New MacUser said, on September 24, 2007 11:49 PM:

Thanks for your advice, I had the same problem after changing my Admin account name. I originally had it as my full name and wanted to change it to a nickname, but once I restarte all of my preferences were gone and I couldnt find my picture files unless I re-imported them into Iphoto. I changed it all back and everything is back to normal, thanks a lot!

rachael said, on February 6, 2008 12:26 AM:

OMG.
i did the exact same thing.
and im always so scared to turn my computer off.
how do i get it back to its old settings.
i don't really understand the above information
please explain>>
??

Jane Regan said, on April 14, 2008 9:17 AM:

Hi all and esp. Dave -

I have a similar problem to all the folks above... but my computer (powerbook G4-OS 10.4) is partitioned into 3. The OS and applications and some home directory files are on one partition and everything else is on the other 2. Suddenly the computer did not want to boot up anymore... so I installed OS only on another partition. STUPIDLY I gave myself the same name and short name.

NOW on the original partition, I cannot 'see' my original home directory files (I want one folder in documents, my Mail folders and my addressbook - that's it.)

I have repeatedly tried to install the OS (archive and install) onto the original partition and this does not work.

What to do?

Are the files there?

Should I buy a data recovery program?

Pay $600-plus for a data recovery place to do data recovery for me?

I am freaking out.

Kerstin said, on June 8, 2008 2:31 PM:

I did the same thing! How do you restore the username? It says that the file already exists when I try to rename it. All of my music is there. I tried to just import everything into the new user but it is copying everything instead of moving it so I run out of room!
iphoto won't even import the pictures! They are now magically all jpegs and it says that they aren't in a recognizable format!

Help!
Please!
Do I need to take it to the apple store? Can I fix this?

Joe said, on October 13, 2008 11:20 PM:

http://support.apple.com/kb/TS1876

Check out this link. It worked for me...

Mike Bradburn said, on December 30, 2009 3:36 PM:

Having done exactly the same thing, I was following the instructions on the recommended Apple article TS1876. However, I am now unable to rename the new home directory as it "is required by Max OS X". Trying to rename the old home directory to the required name (that of the new home directory) also obviously can't be done until the first rename has occurred. I'm tempted to use terminal and sudo the name change, but am hesitant to do this given the apple inference that all should be possible without resorting to this. Has anyone else has run into this?
Thanks.

Ricardo said, on October 18, 2010 7:57 AM:

Hi! I just bought an used mac book from a friend and the home directory has his name. I really would like to change that, but, even after reading all the posts above, simply couldn't find my way. When I select the Local and "Get It's Info", the text field is disabled, and I cant't edit it. If I try selecting the directory and pressing enter, it allows me to edit it, but when I press enter again to save the new name it tells me that I can't change the name of the home directory because it is used by Mac OS. Is there any other way for me to fix this?

Eric said, on December 11, 2011 11:37 AM:

Here is a very useful trick, but one you should use with caution. You can log in to your MAC using the the GUI login, with a user name of root.

You need to click Other at the bottom of the login window. Then, instead of being prompted for a password only, you will be prompted for a user name and a password. You need to know the root (adminstrator) password.

You will get a nice Mac desktop, but you will be user root. This gives you permissions over everything. Like I said, it can be dangerous.

-Eric

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.