Reset Mac user password via SSH

Solution 1:

This might still work? If you log in with SSH.

FSCK the drive for a sanity check.

/sbin/fsck -fy

Mount the drive so it is writeable.

/sbin/mount -uw /

Deleting this placeholder file that tells macOS that a user has already been setup.

rm /var/db/.AppleSetupDone

reboot. Make a new user, reset the password of the old account. Also, reset the login keychain in the old account.