Forgot the admin password in Mac OS X? Well, Apple let’s you boot computers into what is known as Single User Mode. To boot a Mac into Single User Mode, boot the machine holding down Command-S. Once the system boots up, you should see a command prompt. Here, run fsck:
fsck -fy
Then mount the file system:
mount -uw /
Then reset the password using the passed command
passwd <username>
For example, if the user is root:
passwd root
When prompted, provide the desired administrative password.