Unter 10.4
Boot into single user mode (press Command-S at power on)
/sbin/fsck -y [Enter]
/sbin/mount -uaw [Enter]
rm /var/db/.applesetupdone [Enter]
reboot [Enter]
oder
passwd ->It will prompt for your new password twice.
Unter 10.5
Boot into single user mode (press Command-S at power on)
Type fsck -fy
Type mount -uw /
Type launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
Type dscl . -passwd /Users/username password, replacing username with the targeted user and password with the desired password.
Reboot