How to Reset the Administrator Password on an Apple iMac G5 Without a Reboot CD

The best way to reset your Mac's administrator password is through the Password Utility, which is located on a Mac OS X installation disc. If you do not have access to a Mac OS X installation disc, you can change the administrator password by entering Single User Mode. This method includes running the command line application fsck, which scans your hard drive for inconsistencies before you move on to changing the password. Type the commands without the quotation marks but including any spaces.

...
Reset your administrator password without a Mac OS Installation disc.

Step

Start your Mac while holding the Command and S keys until text appears on-screen.

Step

Type "fsck -fy" and press Return.

Step

Type "mount -uw /" and press Return.

Step

Type "launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist" and press Return.

Step

Type "dscl . -passwd /Users/username password", replacing "username" with the targeted user short name and password with the new desired password, and press Return

Step

Type "reboot" and press Return.