1

My laptop became unresponsive yesterday and so I forced it to reboot. When it turned on again my user account didn't pop up as it usually does, neither did guest. There was only the option for "Other..." and it prompted me to enter 'User' and 'password' so I entered my name as it would usually appear and my admin password but it wouldn't accept it!

I followed other steps online suggesting I use Terminal to reset my password (although i'm confident I am typing the correct password), but then it says to select a user account and won't give me any options!

I haven't backed up my photos and I'm worried I will lose them all!

2 Answers 2

2

You can backup your photos by entering in Single User Mode and then :

  1. Steps

type mount -uw /

Then type du -h /Users/home directory/Picturesby this you can find out the space taken by your photos.(If you don't know the name of your home directory type ls -la /Users

Then plug in another pen drive larger than the size of the photos

Then type mkdir /usb

Then type mount -t [filesystem of pen drive] /dev/diskX /usb (X will be your disk identifier

then Press enter and type rsync -p -o -P /Users/homedirectoryname/Pictures /usb

After the copying process is over type shutdown -h now

This will copy your entire photos library which you can open on another mac.

1

As you forced it to reboot, you may have damaged the directory.

You could try Safe Mode by starting (or restart) your Mac, then immediately press and hold the Shift key. The Apple logo will appear on the display. During a Safe Boot the system will take longer to start up than usual as it is running a disk scan.

If you can get to single user mode (boot up holding down Command+S) and type the following command:

fsck -fy

Followed by the return key.

The first command allows the hard drive volume to be made accessible and writable in Single User mode, the second runs the Unix file system check disk, with the flag to force it to run on an HFS-Journaled drive and to fix errors as it finds them. Apple's MAN page on fsck

When it has finished running you will be back at the command prompt. I would recommend running it again to see a clean bill of health.

If you want to look for your user's folders, you can from within Single User mode. First you need to mount the filesystem so you can read it:

mount -uw /

followed by the return key.

Then go to the folder with the user home folders:

cd /Users

followed by the return key. Then list the contents: ls -lsah followed by the return key.

You should see the name of your user account here. If you would like to verify that your data is still there you can run the disk usage utility:

du -hcd 1

followed by the return key. Or another way that displays a little differently:

du -hs *

followed by the return key.

This command will show the total of the folders as well as the size of files.

The switches used are h for human readable sizes (not blocks), c for a total, and d for controlling the depth to only show the top level. You can change the number to tell it to calculate and list subfolders in the same list or use 'cd foldername' to move into the desired folder. Once inside the folder you can use 'ls' or 'du' as above.

To exit this mode and start up normally, type "reboot", then press Return.

2
  • Could I do more damage by entering in the commands or is it simple enough? I'm rather hopeless with computers!
    – max.ride
    Sep 24, 2017 at 6:56
  • It is pretty straightforward as described. Of course, start with the first comment about booting to Safe Mode by holding the Shift key. If you are more comfortable, you can also boot to the Recovery Partition. Boot up holding the "R" key. Choose Disk Utility and select your drive to repair.
    – Brett
    Sep 24, 2017 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .