Create a new Mac OS X adminstrator account without an existing administrator password
With access to the Mac OS X single user mode, you can create a new administration-level user account without entering a current administrative password. This process is useful for technical support and troubleshooting, but it does have important security implications.
The following process should be used only as a last resort, when none of the administrator-level accounts on the computer are functional. If you are providing technical support, you should only create a new administrator account in this manner if you have permission from the computer&rsquos owner or system administrator.
In most cases, you can do what is necessary using an existing administrator account. You may need to Change your Mac OS X account password in System Preferences. Or, if the password is not known or forgotten, you can Change a forgotten Mac OS X account password by starting up from any Mac OS X install disc.
- Restart the computer in Mac OS X single user mode by holding Command-S at startup.
Mount the computer's drive for read/write access. To do so, type the following command at the command prompt, and then press Enter:
% mount -uw /
Remove the file that identifies that the initial run of the "Mac OS X Setup Assistant" has been completed, with this command at the command prompt, followed by Enter:
% rm /var/db/.applesetupdone
Restart the computer by entering this command, followed by Enter.
- The Mac OS X Setup Assistant screen should appear after the reboot, just as it does when you start up a brand new computer or upgrade to a new version of Mac OS X.
- Create a new user account with the Setup Assistant. Be sure to name this user something different than the admin user that already exists on the system, and use a strong password (see "Mac OS X password tips"). At the end of the Setup Assistant process, the system will automatically log into this new user account. The account will have a unique ID (UID) that is one higher than the last user that was on the system, and will have all administration privileges.
We strongly recommend that you delete the new administrator account in the System Preferences application, once you have done what you need to do with it and it is no longer needed.