I’ve had customers who have either bought a Mac system used or forgotten their login credentials. I was able to reset the user accounts on the system by booting the system into Single User mode (boot system while holding down APPLE+S) then using the following in the command line:
/sbin/fsck -y [Enter]
/sbin/mount -uw / [Enter]
rm /var/db/.applesetupdone [Enter]
reboot [Enter]