If you forget your user password and don’t have access to your information, don’t worry, Apple has thought of a solutionfor you!
In general, what you need to do is access the kernel console in single-user mode. To access this command screen, start the device and press the keys [⌘+S]. Once you have the black screen with white letters, enter the following lines of code exactly as is show:
Currently, this process has been modified to increase security regarding the identification of the device owner. You would need to access the Mac’s recovery mode. Once inside, you should provide your identification, such as iCloud information, EFI password(if FileVault is activated), iCloud password(if linked), etc.
Once you have identified yourself as the owner, go to the Terminal and enter the command “resetpassword“.
Summary:
Enter Recovery mode.
Identify yourself as the owner.
Go to Utilities.
Open Terminal.
Enter “resetpassword.”
Done and enjoy! Note: Based on our experience, we recommend always using passwords that you won’t forget and establishing a pattern in each of them that is similar with certain variations. And of course, avoid changing your password too frequently to prevent ending up in such tense situations.