1

This morning I needed to reset an administrator's account password on my Mac, because I had forgotten the password.

I used the steps listed on this article to accomplish this, but after restarting the Mac, I found that it was taking a while to boot. I shrugged this off, let it sit for while, then came back around half an hour later and it was still booting. I tried to restart it again, but to no avail.

References:

  • the computer is an iMac 2009
  • running OS X 10.7.5 Lion
  • no Recovery partition or capabilities

Other notes:

  • When I run the fsck -fy command in single-user mode, the computer returns:

/dev/rdisk0s2

Root file system

Executing fsck_hfs (version diskdev_cmds-540.1~34).

Checking Journaled HFS Plus volume.

Invalid B-tree node size

(3, 0)

The volume could not be verified completely.

/dev/rdisk0s2 (hfs) EXITED WITH SIGNAL 8

  • 1
    I'm pretty sure an 09 iMac will need to be booted from DVD to get to recovery. support.apple.com/HT202313 – Tetsujin Jul 16 '16 at 14:40
  • How far does the Mac get in the startup process? Does it let you choose a user and enter a password? Does it accept the password but you never reach the desktop? And, can you start your Mac using a different user account? – Christian Boyce Jul 16 '16 at 14:41
  • @ChristianBoyce It gets to the screen with the Apple logo and spinning wheel icon, but it just stays there. Can't choose a user account whatsoever. – Munesawagi Jul 16 '16 at 14:43
  • @Tetsujin Do you mean the original install disk? – Munesawagi Jul 16 '16 at 15:01
  • Yup, or a retail 10.7.5 disk – Tetsujin Jul 16 '16 at 15:09
1

This is not a direct answer, however, when the computer 'chimes' after activation, press and hold the key combination: command V to enter 'verbose mode'. This should illustrate to the screen exactly what is happening during the boot process. If the process hangs on a particular step, then this is likely the issue, the remedy for which may be varied.

Alternatively, using the key combination command S immediately after the computer chimes, will grant you command-line access to the machine. OS X Lion is vulnerable to what I can only assume is a security error on Apples part, where an additional Administrator account can be created by fooling the computer into launching as it would during its first-ever launch.

The procedure for which is simple:

  • Boot using command-S to gain basic terminal access.
  • Mount the primary drive using the command: mount -uw
  • Remove the 'applesetupdone' file using the command: rm /var/db/.applesetupdone
  • Exit and proceed using the command: exit

I should state that this is not in any way damaging to the computer, you will maintain all your files, preferences and data, it simply allows you to create an additional admin account.

Using the instructions on-screen, create an additional account, from this position, you at-least have admin access to the device, however im afraid that this may not help you recover your password, only all of your data.

For additional password-recovery options, I would suggest consulting the below link, however it involves a lengthy and inefficient brute force attack.

http://www.hackmac.org/tutorials/crack-lion-password-hashes/

This may not be a direct answer, but I hope that it helps.

  • ahh, you edited your question whilst I was typing this – user4493605 Jul 16 '16 at 15:17
0

I was able to solve the problem by booting into single-user mode and entering these commands:

Mounting the failing drive

/sbin/mount -uw /

followed by repairing the disk

fsck_hfs -y -Rc -d /dev/disk0s2

then rebooting the computer into normal mode

exit

You must log in to answer this question.

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