Changed the user account name; unable to use sudo I tried renaming my root user account and for a second after saving it looked like it had no name whatsoever. That was the last time I could use the "lock" icon under Users &amp; Groups.

I followed some instructions by rebooting in CMD+S mode and basically using passwd command to reset it which allowed me to log in but I'm still powerless to use anything that requires admin privileges.

For instance, the "put in your root password" dialogue box is no longer pre-filled with my account name and no variation of the name seems to work.

Using sudo in the terminal results in:

~/lab ~ sudo nano /etc/sudoers
Password:
johnnyuser is not in the sudoers file.  This incident will be reported.


What do I do to restore things to the way they were before?
This question has been answered here: Changing my administrator user&#39;s username has removed privileges

I had this issue as well and it worked for me.