If you cannot boot into recovery mode or internet mode, this issue may be hard to tackle.
Before we start, please be sure to back up any files on your Mac.
Back up your Mac with Time Machine
- https://support.apple.com/en-us/HT201250
Please also note that this method is not encouraged by Apple, but usually works. You may also see some effects such as loss of data or damaged OS. However, these issues do not occur often.
To begin, restart your Mac. When the start-up chime rings and the white screen appears, hold the Command ⌘ + S keys. This will take you to Single User Mode. Be sure to do this before the Apple Logo appears. Hold the two keys down together until a black screen appears. You may then let go of the keys. A large number of lines of code will automatically appear on your slowly, do not do anything while this happens.
Wait until you think the commands are fully done appearing. After that, enter the commands listed below one by one. Be sure to click the Enter or Return key after each command.
mount -uw/
rm /var/db/.AppleSetupDone
shutdown -h
That last command should automatically shutdown your Mac. If not, proceed to shut it down manually. After your Mac shuts down, power on your Mac. Once the boot has finished loading, you should be greeted with a screen to either to choose your language of preference and continue with Mac setup or if on a macOS X Server (10.6.8), the ability to create and register a new server. (Please Note: Creating a new server will not result in a fee.)
Try to use the link below for any extra information:
https://www.iseepassword.com/reset-mac-login-password.html
If this doesn't resolve your issue, please look at the other answers to your question.
I hope I helped
Cheers, John Williams