Do You Remember Your Password?

In the early days of OS X, a lost password was a significant issue. Before the introduction of the Mirrored Door Drive Power Mac and machines shipping with OS X as the default boot system, should you forget your password you had significant problems. When Macs first shipped with OS X as the default boot volume, Apple added to the install media an application that would allow you to change a user’s password.

With the launch of Lion, we are faced with a similar issue. Lion machines come with no physical media. All units with Lion on them are configured with a recovery partition on the hard drive that includes few options. If you are having an issue with your Mac, you can use this partition to boot the unit and launch Disk Utility, the network-based installer, Safari and a few other options. Missing from the recovery boot is the password reset utility.

So if you forget your admin password, how do you change it? In all versions of OS X once a User has been created, a file called .AppleSetupDone appears and is located in /var/db. If you boot the machine to single user mode by holding down command key and the letter ‘S’, you can mount the file system and remove this file.

Power the unit holding down command key and ‘S’
type mount -uw /
Change directory, cd /var/db
Remove the file, rm .AppleSetupdone
Exit single by either typing exit or restart with reboot.

When the system restarts you will run through the entire setup as if the unit was brand new. Creating a new user account will give you access to the machine as an administrator.

After creating this new user account, you will be able to open System Preferences and select Groups and Users. Then, after unlocking the the Preference Pane, select the User account you wish to change the password for and select Reset Password. As always, when you change the password for a User, whether it be with the Password Utility from install media or via this route, make sure you rebuild the keychain. You will have to authenticate for each service as you launch it until the new password is in your new keychain.

Similar Posts

  • Sharing Your iTunes Library

    If you own more than one computer, having two separate iTunes libraries can become frustrating and confusing. Luckily, iTunes has the ability to…

  • I Smell a RAT

    Back in February, the Apple world was rocked by the announcement of a Trojan called BlackHole RAT (Remote Access Trojan) that could allow…

  • Windows on a Mac: 32 or 64-bit?

    Customers installing Windows on their Macs often ask whether they should go with a 32 or 64-bit version of Windows (Win32 or Win64)….

  • What Does 64-bit Mean to Me?

    When Apple introduced the Power Mac G5 in 2003, it was touted as “The world’s first 64-bit personal computer.” This was due to…