User Name
Password
AppleNova Forums » Genius Bar »

*slaps head* I renamed the Home folder


Register Members List Calendar Search FAQ Posting Guidelines
*slaps head* I renamed the Home folder
Thread Tools
timmmee
Member
 
Join Date: Sep 2005
 
2005-09-06, 15:20

Hey, everyone, I'm the n00b Mac kid who is still getting his bearings. (iMac G5 20" 1 gig RAM w/ Tiger)

When I created my account on the iMac, it said that the short name and Home folder could not be renamed. However, I was aimlessly clicking around in the Finder hoping to find some more cool stuff as I always do, when I tried clicking on the Home folder as if to rename it. To my surprise, it let me, so I figured that this was more of a display name instead of the official "Home Folder" name. I changed it and didn't notice anything different, but when I came back later to the computer, all my settings were defaulted (as Brad told me in a PM, as a result of changing the Home folder name).

There's also the issue with the cmd+ctrl+d for looking up words in Safari, Mail, etc. It doesn't work anymore for some odd reason on that account. (This is the only other real difference I've noticed, as I've returned my settings to normal.) Of course, it worked fine before I changed the home folder name, but when I returned, nothing.

Did I permanently screw something up? How come Apple let me change it if they knew I was a n00b that will obviously destroy my new computer?! (I CAN'T HANDLE THE NEWNESS... )

Last edited by timmmee : 2005-09-06 at 15:21. Reason: w.c.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-09-06, 15:35

Well, I guess instead of creating a new thread for this long explanation that I just typed out, I'll paste it here...

"OMG! I've lost everything and all my settings have reverted to their defaults! My iTunes/iPhoto libraries are gone, my application preferences have been reset, and things are breaking left and right. Help!!

This is a story I've heard a few times lately. Each time, the cause of the problems has been the same: renaming the home folder. I've written this explanation/primer to help you resolve your problems if you're one of these people.

Each user has a "short username" that you provide when you first create your account. The system creates a folder using that same name under the /Users directory; this becomes your home folder. If you ever change the name of your home folder from your short username to something else, all hell breaks loose.

Why?

Note in System Preferences -> Accounts that you cannot change your short username. This is because there are facilities in the system and various software titles that become hard-coded to that name once it has been created. It is "set in stone" for all intents and purposes and cannot easily be changed. Your home folder is one of those things. Changing the name is a big no-no.

So, what happens when everything go haywire? Where did your old files go?

Even though you renamed your existing home folder, your system still expects the old name to be there. The next time your computer tries to save settings for something, it recreates the correct filesystem hierarchy matching your short username. That means you'll now have two home folders, your old one that you renamed to something else and a new one that the system is trying to resurrect.

If you log out or reboot, you'll find that all of your user settings, documents, libraries, etc. are not where you might expect them to be. They're no longer in your home folder. Why? By this time, your system has recreated the default (correct) hierarchy for your home folder using your short username. Your files and settings are still perfectly fine and intact, though. Where? In the folder that you renamed!

How can you fix things?

Simple: rename your new home folder (with the correct short username) to something arbitrary. Then, rename your old home folder (the one you changed originally) back to your correct short username. Log out and log in. Everything should have nicely returned to the way it was before you started renaming.

What if you really really want to change my short username and home folder name?

I really don't recommend this. You can potentially screw things up permanently (short of erasing and starting over) if something goes wrong. If you think you're really determined to go for it, though, you can download and use ChangeShortName. READ THE INSTRUCTIONS on that page and included with the downloaded application. Everything it does is explained in great detail.

Now, if this is so detrimental, why did the system allow you to do it in the first place?!

Honestly, you'd think it shouldn't. Disabling the group writable bit on the /Users directory prevents users from renaming their home folders. Why it isn't like this by default is baffling. My best guess is that it's left writable so an admin user can remove deleted users' home folders/archives. Also, it's worth noting that only admin users can rename the folders. So, if you use a regular account, you have nothing to worry about.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
timmmee
Member
 
Join Date: Sep 2005
 
2005-09-06, 16:23

Thank you very much, Brad--I rebooted the iMac and everything is running smoothly again!

(Even the Safari word lookup, so I guess it was really all due to my Home folder changes.)

I assume it's safe to throw away the new Home folder that OS X created...I named it "Pointless." (there are no files in it that I created since the incident.)
  quote
BarracksSi
BANNED
I am worthless beyond hope.
 
Join Date: Jul 2004
Location: Washington, DC
 
2005-09-06, 20:20

Yup, you can throw away the new, Pointless home folder. I got rid of the previous owner's home folder manually on my last iBook.

What I want to know now is whether it's possible to prevent renaming the home folder. I've set up a "Borrower" account (very limited privileges, Simple Finder, just a few apps) for those rare times that I let someone else use it, but I'd like to avoid having someone accidentally screw things up.
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-09-06, 20:37

Code:
chown 0:80 /Users; chmod 755 /Users
  quote
BarracksSi
BANNED
I am worthless beyond hope.
 
Join Date: Jul 2004
Location: Washington, DC
 
2005-09-06, 20:45

Quote:
Originally Posted by faramirtook
Code:
chown 0:80 /Users; chmod 755 /Users
What does that do?
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-09-06, 21:08

Changes the ownership to root, the group to admin (for admin accounts), and then makes it so only the owner (root) can write, but everybody else can read.
  quote
BarracksSi
BANNED
I am worthless beyond hope.
 
Join Date: Jul 2004
Location: Washington, DC
 
2005-09-06, 21:18

So -- does that apply to *just the name* of the Home folder itself? Can I still add & delete folders within the Home folder?
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-09-06, 21:22

Yep. Only affects the reading/writing of the Users directory only. Any file/folder inside isn't affected.
  quote
BarracksSi
BANNED
I am worthless beyond hope.
 
Join Date: Jul 2004
Location: Washington, DC
 
2005-09-06, 21:28

Ah, cool. What do I do when I want to create another user?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2005-09-06, 23:46

I just reported rdar://4246734, "Finder allows home directory renaming, resulting in broken user account" on this.
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-09-07, 07:24

Just create another user. Finder'll ask for your password anyway, so it'll have everything you need.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-09-07, 07:46

I wouldn't use faramirtook's command.

First of all, you don't need to chown the /Users folder at all. It already belongs to a the root user and the admin group.

Secondly, changing the permission flags on /Users is only a temporary solution. The next time you repair your drive and fix the permissions (or the next time you install a package that modifies /Users), it'll reset /Users back to the default way Apple had it.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-09-07, 08:28

The chown-ing was just to make sure, Brad. I don't have that problem with my Users directory because I have my home on another drive, so I've never had a problem with permission repair. But those are the permissions I use on the root of the dirve with all of my home directories.

Ale, man, ale's the stuff to drink
For fellows whom it hurts to think

Last edited by faramirtook : 2005-09-07 at 08:30.
  quote
euain
Member
 
Join Date: Jan 2005
Location: UK
 
2005-09-07, 08:55

Quote:
Originally Posted by faramirtook
Code:
chown 0:80 /Users; chmod 755 /Users
Take care using numbers here as well.. maybe OSX is stable - but generally on unix, there is no guarantee that GID 80 is always going to be the same group on all machines (root is always UID 0 as far as I know).

Safer if you want to do the chown (unnecessary as Brad points out) would be chown root:admin /Users

Euain
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
"Easiest" way to rename home folder usurp Genius Bar 6 2007-12-19 11:02
Trying to copy the home folder Mr. X Genius Bar 24 2005-11-28 06:39
iPod to iTunes omem Genius Bar 5 2005-07-16 13:32
concerning folder actions VOX BARBARA Genius Bar 1 2004-07-02 10:39
Home Folder wtf? SonOfSylvanus Genius Bar 20 2004-05-25 11:36


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 18:19.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova