Hi,
restart the computer and press COMMAND + S. When at the prompt, type:
OS X 10.6 Snow Leopard or earlier, type the following:
/sbin/fsck -fy
/sbin/mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . -passwd /Users/[username] [new password]
If you're running OS X 10.7 Lion or later, type this:
/sbin/fsck -fy
/sbin/mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
dscl . -passwd /Users/[username] [new password]
In all cases, you'll need to replace [username] (including the brackets) with the user of the account whose password you want to change, and [new password] (again, including the brackets) with your new password. If, for example, your username was smith john and the new password you wanted was 12345678, you'd type
Regards