I changed my username in MacOs Sierra and I cannot log in anymore to my Admin System Preferences. How to fix this?
So here's what happened. Last night, I was trying to change my iMac to a new username.
I logged in to System Preferences > User Accounts and then I clicked that lock icon on the left so I could fully unlock my admin tools.
Now inside in my user account, I changed my old username to a new name. When I hit apply, the new username I typed then disappeared and left blank in the fill-in box. I assumed that everything was working well so I restarted my iMac...that was a big mistake.
after restarting my mac, I went back to the User Accounts and now I'm stuck. I cannot login anymore to my admin tools and everything is restricted.
as you can see here in this image. I filled in my new username and password but it's not working.
I followed some of the advice here by doing single boot setup by doing rm /var/db/.AppleSetupDone
but I have no luck of doing it as it says "no such file directory".
is there a way to fix this glitch? I really need to access my admin tools because I cannot install a new software and other applications that require username and pass.
iMac, macOS High Sierra (10.13.1), iMac (21.5-inch, Mid 2011)