Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Home directory inaccessible - can't login

Home directory inaccessible - can't login
Thread Tools
Atheist
Mac Elite
Join Date: Sep 2006
Location: Back in the Good Ole US of A
Status: Offline
Reply With Quote
Apr 3, 2011, 09:37 AM
 
A little info on my setup:

Core i7 Hackintosh
10GB RAM (formerly 12GB)
6 HDs:
- 64GB SSD Boot Drive
- 1.5TB Media
- 1.5TB Media
- 500GB USB Time Machine
- 500GB USB Media
- 500GB USB Home Directory (since the SSD is so small)


Here's the sequence of events:

1. Short power outage at 4 AM. My UPS battery died months ago so it's basically acting as a surge protector now.... thus my computer is off when I get up this morning.

2. Grab a cup of coffee, feed the puppy, turn the computer on. Motherboard issues a shrill beep for a few seconds and then continues booting as normal. This is not abnormal as the heat and humidity here is already taking a toll on my 1.5 yr old motherboard. One of the memory slots is dead and I suspect the beep is indicating another is probably on it's way out.

3. Computer boots as normal except instead of seeing my desktop (auto login is turned on) I see a message:

"You are unable to log in to the user account (me) at this time"
"Logging in to the account failed because an error occurred."

Gee thanks Apple for your meaningful error messages. This is where their less-is-more mantra fails miserably.

4. Oh yeah... I forgot to power up the USB drives before booting up. I reach back and turn on the 3 USB drives. Here's were it gets a little weird. I click the OK button on the error message and now I get another message telling my my home folder is not in the expected location so it logs me in using my default home folder on the boot drive.

5. Okay I say... I'll just go into the user settings and set my home directory back to the USB drive. The USB drive is mounted and accessible. I'm able to look at it through Finder without trouble. After setting the home folder back to the USB drive, I reboot.

6. And now I'm back where I started:

"You are unable to log in to the user account (me) at this time"
"Logging in to the account failed because an error occurred."

The only difference is that this time, the USB drive is on. And now it won't magically default to logging me in using the home folder on the boot drive.

I can boot in single user mode and view the HOME volume (the USB drive with my home folder). It's not reporting any kind of error on the drive that I can see.

I've only got one account setup on this box so I can't log in as a different user.

Does anyone know what plist I could edit so I can point my home directory back to the boot drive? That would at least allow me to log in and somehow figure out what's going on with the USB drive.

Any help is appreciated...
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Apr 3, 2011, 11:14 AM
 
No plist for that, just symlink your home directory to your drive.

What do your logs say when you try to login? This may be one of those rare times where repairing your permissions might help.
     
Atheist  (op)
Mac Elite
Join Date: Sep 2006
Location: Back in the Good Ole US of A
Status: Offline
Reply With Quote
Apr 3, 2011, 12:05 PM
 
Originally Posted by besson3c View Post
No plist for that, just symlink your home directory to your drive.
I'm not sure I follow. As it stands now, I technically have 2 home directories:

/Users/me
/Volumes/HOME/me

When I set up the computer /Users/me was my home directory. I subsequently changed it to /Volumes/HOME/me. That's done via the advanced options:



I'm certain that somewhere a plist setting is telling OS X to use /Volumes/HOME/me as my home directory. It's not a symbolic link. I say that because /Users/me was still available after I had set /Volumes/HOME/me to my home directory.

I don't think it's looking at /Users/me at all when I attempt to log in.

What do your logs say when you try to login? This may be one of those rare times where repairing your permissions might help.
Since I can't log in, I can't use the console to see the logs. I'm not sure exactly where in the file system the logs would reside.

I need a solution that can be accomplished while logged in single user mode.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Apr 3, 2011, 12:47 PM
 
Your logs can be accessed in single user mode, they reside in /var/log, just tail or cat them
     
Atheist  (op)
Mac Elite
Join Date: Sep 2006
Location: Back in the Good Ole US of A
Status: Offline
Reply With Quote
Apr 3, 2011, 01:58 PM
 
Okay...I'm getting closer. But still not quite there.

I figured out how to change the users home directory while in single-user mode. It's with the dscl command. You have to first launch the DirectoryServices daemon:

$ launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist

To see what the current setting is type:

$ dscl . -read /Users/username NFSHomeDirectory

To change it:

$ dscl . -change /Users/username NFSHomeDirectory /Path/To/Current/Folder /Path/To/New/Folder

With that I was able to reset my home directory to /Users/me and log into the computer. But I'm still not able to change the folder to my HOME volume (the USB drive).

When logged in with /Users/me as my home directory, OS X mounts my HOME volume as /Volume/HOME as expected. I then change my home directory using the Accounts Preferences Pane back to /Volumes/HOME/me and reboot. No luck. The HOME volume is now getting mounted as /Volumes/HOME 1 and there is an empty directory at /Volumes/HOME. When I log in single-user mode, there is nothing at /Volumes/HOME so I'm really confused.

I've got another SATA hard drive I'm going to install and see if I can get that working as the home folder.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Apr 3, 2011, 02:01 PM
 
I don't understand why a simple symlink wouldn't do you what you want?
     
seanc
Moderator Emeritus
Join Date: Apr 2005
Location: Cambridge, UK
Status: Offline
Reply With Quote
Apr 3, 2011, 02:30 PM
 
Might be the simplest way out at this point.
I believe
ln -s /Users/me /Volumes/HOME/me
should do the trick.
     
Atheist  (op)
Mac Elite
Join Date: Sep 2006
Location: Back in the Good Ole US of A
Status: Offline
Reply With Quote
Apr 3, 2011, 02:50 PM
 
I'd rather not use a symbolic link because I prefer doing things the way the OS was designed. Maybe it's silly but it's just me. Plus, I've had enough trouble with symbolic links (see my iTunes thread) so I'd prefer to do it the "correct" way.

I've moved my home folder to an internal drive and used the Accounts Preference Pane to set my home folder accordingly. Everything is working fine now.

Thanks for the suggestions everyone.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Apr 3, 2011, 03:41 PM
 
Try looking in your /Volumes folder. Sometimes when crashing, the old mountpoint is not removed correctly. You will not see this, because OS X will simply create a new one under a different name. In your case, your USB drive would now be a /Volumes/HOME 1. This has no effect on the Finder, but plays havoc with UNIX paths.

If this is the case, the fix is simple: Unmount the USB drive. Remove the old mountpoint manually (rmdir HOME in the /Volumes directory should work). Mount the USB drive again. If you want to prevent this happening again, consider forcing the USB drive mountpoint manually (using /etc/fstab or similar).

EDIT: It turns out that fstab is deprecated in SL, so you should probably use the more modern way (the auto_master file) for a stable longterm solution.
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Apr 3, 2011, 05:18 PM
 
Originally Posted by Atheist View Post
I'd rather not use a symbolic link because I prefer doing things the way the OS was designed. Maybe it's silly but it's just me. Plus, I've had enough trouble with symbolic links (see my iTunes thread) so I'd prefer to do it the "correct" way.

I've moved my home folder to an internal drive and used the Accounts Preference Pane to set my home folder accordingly. Everything is working fine now.

Thanks for the suggestions everyone.

I'm glad you got stuff working, but just to potentially save you time in the future, don't let your iTunes experience taint your experience of using symlinks. iTunes is just retarded, but normally symlinks are a perfectly acceptable way to get around problems like what you were experiencing, especially if you just desire a quick fix.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:16 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,