After you’ve logged out of iCloud, quit any other apps that are running in the background. Restart your Mac and wait for it to boot up. While it’s loading, press and hold down the Command + R keys until it reaches recovery mode. Then go to the top menu bar and select Utilities > Terminal. Enter the command “reset
On a Mac, launch System Preferences and go to Users & Groups. The account of the current user, you, will appear at the top of the list on the lefthand side of the window. Select your account from the drop-down menu and see what settings are available in the right-hand window.
Turn off your computer and hold the power button + Command R. Wait for the loading bar to appear on the screen while your Mac boots to Recovery. Next, choose Disk Utility > Continue > Utilities Terminal. Type “reset password” (in one word) and click Return.
If you don’t see a question mark, press and hold the power button for five seconds until your Mac shuts down, then press the power button to restart it. Enter the recovery key, then click Next. To reset your login password, follow the on-screen instructions.
Press the Power button, Command + S at the same time to restart your Mac. When the command prompt appears, type ls /Users The computer will display a list of present users and usernames on the system.