Help recovering a user account

Discussion in 'macOS High Sierra (10.13)' started by galstaph, Jun 19, 2018.

  1. galstaph macrumors 6502a

    galstaph

    Joined:
    Jul 24, 2002
    Location:
    The Great White North Eh
    #1
    So I finally got high Sierra to boot up on my hard drive again (see here for that story), however it come up to the login screen and my username will not compute. (yes I am that guy who only has the main user and the guest account on there, Guest would not login either - I thought there was no password for that... hmmm). Tried my password nothing - tried every password I could have ever used - nothing. So I go into recovery to try to reset - no user accounts found. I was having trouble with the drive not mounting before - but hey it is loading osx so why the trouble now i think. Go to single user mode and the user is there when listing users - but when I try to reset password using command line it cannot seem to find it. I also tried to create a new admin account which failed - it said read access only and gave me an error code which I did not write down before crossing my fingers and rebooting - which led to the same old login screen

    Any suggestions? I have data backed up but not any of the settings or programs. I plan to utilize time machine if I can get back in.
     
  2. Krayzkat macrumors 6502

    Krayzkat

    Joined:
    Apr 22, 2011
    Location:
    UK
    #2
    Try unplugging it from the wall socket and holding down the power button. I had to do that once for something. I think it basically wipes/wears down any built up static electricity charge that doesn't dissipate.

    If that doesn't work, just hang about here wait for a geek to come along....
     
  3. galstaph thread starter macrumors 6502a

    galstaph

    Joined:
    Jul 24, 2002
    Location:
    The Great White North Eh
    #3
    I've pulled power out - pulled the mainboard, pulled the video card, replaced the battery (probably about time for that anyway after 9 years), reset pram nothing helped. I wasn't even getting it booting into osx until I put in my old gt120, force mounted and tried to repair the disk (which failed). then I booted into windows (different disk) and after reboot it went into osx - just login screen (I had it set to auto-login).
     
  4. Fishrrman macrumors G5

    Fishrrman

    Joined:
    Feb 20, 2009
    #4
    OP:

    If you can get the computer booted, connect your time machine backup.

    Then open Migration Assistant and see if it can locate and import your old account, settings and data from the TM backup.

    Try this and get back to us BEFORE you try anything else.
     
  5. redpandadev macrumors regular

    Joined:
    Jun 3, 2014
    #5
    can you boot in single user mode (hold down command+s at boot up)? If it works, you will get a bunch of text on the screen and ultimately a command prompt (terminal). If you can get that far then post here and there's a few different things you can try that may fix it...
     
  6. galstaph thread starter macrumors 6502a

    galstaph

    Joined:
    Jul 24, 2002
    Location:
    The Great White North Eh
    #6
    I don't have a time machine backup yet. I plan to do that after getting things going. I have backed up data outside of timemachine, just not my wife's work email stuff that is on the local side that is really the only thing stopping me from just reinstalling.
    --- Post Merged, Jun 19, 2018 ---
    I can get into single user mode. What do you suggest from there?
     
  7. redpandadev macrumors regular

    Joined:
    Jun 3, 2014
    #7
    Press return after each command:

    1) Boot to single user mode
    2) Check the filesystem for errors
    Code:
    /sbin/fsck -fy
    3) Mount the filesystem read/write
    Code:
    /sbin/mount -uw /
    4) Delete the .AppleSetupDone file
    Code:
    rm /var/db/.AppleSetupDone
    5) Reboot
    Code:
    reboot
    Performing this procedure will cause the Setup Assistant to run after the next boot. My recommendation is to use the Setup assistant to create a new user (use a different "Full Name" and short name than your previous user). This will recreate the local open directory database and create a new admin user on the computer. From there you should be able to recover the files in your lost user (they will be located in [root volume]/Users/[previous short user name]). Note that you may not initially have permission to these files, but should be able to get permission since you are an admin user. This *should* get you back up and running. If anything goes wrong with this, then the whole OS may be damaged in a way that is not recoverable, and you may have to recover the files by connecting the drive to a working computer and/or performing a complete reinstall of the OS.
     
  8. galstaph thread starter macrumors 6502a

    galstaph

    Joined:
    Jul 24, 2002
    Location:
    The Great White North Eh
    #8
    Thanks - I was able to check the disk which said it appeared to be ok and redo the setup - so now I am in - interestingly enough the users in control panel does not show my old user account :( but the files are still there in the finder - so now to manually make the new user account like the old I guess.... Thanks for your help!
     
  9. Fishrrman macrumors G5

    Fishrrman

    Joined:
    Feb 20, 2009
    #9
    "interestingly enough the users in control panel does not show my old user account :( but the files are still there in the finder - so now to manually make the new user account like the old I guess.... "

    Here's how I'd do it:
    You will need some kind of EXTERNAL drive large enough to hold the user account (home folder). It can be either an external hard drive or even a USB flashdrive if that's large enough.

    Then, do this:
    1. Copy the home folder (the one you're having a problem with) to the external drive. Just "drag it and drop it" onto the external drive's icon.
    2. Observe -- does everything get copied over?
    3. If yes, close all folders on the external drive, so that only the drive icon is visible in the finder.
    4. Click on the external drive's icon ONE TIME to select it
    5. Now type "command-i" (eye) to bring up the get info box for the external drive.
    6. At the bottom of get info, click the lock icon and enter your password (the one for the new account that you're logged into)
    7. In "sharing and permissions", put a check into the box "ignore ownership on this volume".
    8. Close get info.

    WHY YOU DID THIS:
    You can now copy anything from the OLD home folder into the new one, and anything you copy over will come "under the ownership" of the NEW account.

    Next:
    VERY IMPORTANT:
    You CANNOT COPY the "main subfolders" from the old account to the new one.
    By "main subfolders", I mean the folders named Documents, Downloads, Library, Movies, Music, Pictures, etc. These are "more than just folders", I believe they are symbolic links and cannot be moved from one home folder to another.

    HOWEVER...
    You CAN COPY files and folders that are INSIDE OF these folders.
    That means that you could open the "Music" folder on the old account, select a number of files inside, and then "drag and drop" them onto the icon for the Music folder in the NEW account, and they will "go right in" and then become usable there.

    So...
    Some (actually quite a bit) of "manual work" is going to be required.
    I suggest you get a pencil and paper and keep notes as you go.

    The following may also work:

    I believe you can even copy the entire iTunes folder if you wish, REPLACING the iTunes folder in the NEW account. ITunes will have to upgrade the folder once you do this, but it should work.

    Same for iPhoto/Photos. You could drag and drop the Photos library from the old account into the Pictures folder, and let it "replace" the "new" one. Again, updating may be required.

    It's also possible to copy over stuff from the home/library folder, but some things will work, and some things may not.
    There are LOTS of subfolders and files inside.
    Experimentation will be necessary.
    Don't do this all at once. Do it a little at a time, check after moving a few things, then go back and move more.

    Hope this helps.
     
  10. redpandadev macrumors regular

    Joined:
    Jun 3, 2014
    #10
    This is what I would do:
    1) Get the short user name of your previous user (the broken one). You can find this in Finder by simply getting the name of the folder containing your files in /Users/[old username]

    2) Get the short user name of your current (new) user. Same thing - you can find this in the Finder by simply getting the name of your user folder from /Users/[new username]

    3) Open terminal and enter the follow command, replacing oldusername and newusername accordingly:
    Code:
    sudo chown -R newusername /Users/oldusername/
    4) Reboot to single user mode (hold down command+s at boot time)

    5) Check the filesystem:
    Code:
    /usr/sbin/fcsk -fy
    6) Mount the root filesystem read/write:
    Code:
    /usr/sbin/mount -uw /
    7) Move aside the user folder that got created for the new user (just in case there's a problem and you need to move it back):
    Code:
    mv /Users/newusername/ /Users/newusername.archived
    8) Move the old user folder to replace the new user folder:
    Code:
    mv /Users/oldusername/ /Users/newusername
    9) Reboot:
    Code:
    reboot
    Assuming everything is good, you can go ahead and remove /Users/newusername.archived - Using the Finder to do this should be no problem. Glad you are back in business (mostly) and will be able to recover all your files!
     

Share This Page