Mac logged me out and can’t get back in My Mac logged me out and it forces me to login with the Guest account, which for some unknown reason is password protected and I can’t login! I tried restarting it but the issue persists!

Before that happened, it seems like I was logged out from my iCloud account! So I filled in my password and while I was waiting to login, the Mac froze! I restarted it and you know the rest...

What can I do now?

EDIT: I’m now pretty sure that my main account is deleted! I tried resetting my password from terminal in the recovery mode... when prompted to select the account, there was just an empty list!
The various options to recover control are quite straightforward to enumerate, and you might have one you think is best to start with:


Boot to recovery and reset the password of one or several admin accounts. (Also, you can use Terminal app in recovery to look if your /User folder is intact before deciding what to do.) - https://support.apple.com/en-us/HT201314
Make a new admin account, then look / repair / backup / reinstate other accounts. - New MacBook had user accounts already; I deleted admin and can&#39;t get back in
Bring another OS to the Mac and backup / fix / diagnose. - https://support.apple.com/en-us/HT202796
Reinstall the OS and see if migration repairs the account - https://support.apple.com/en-us/HT204904
Wipe the Mac and load a backup (easy if you know TimeMachine is ready to go) - https://support.apple.com/en-us/HT204904


Which you choose is mostly up to your skill level and if you know you have a backup - it takes about 10 minutes of time to erase / install then you wait, then it’s 5 minutes to start the restore, and then you wait until it’s done.

The other options can take far less time once you know the steps, but for some take a bit of learning in terminal and could end up with data loss if you don’t just back things up first.