4

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 & 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?

dsp_099
  • 171
  • In single user mode, edit the /etc/sudoers file by adding the line johnnyuser ALL=(ALL) ALL to the file – Allan May 08 '18 at 17:43
  • 1
    Since the incident was reported I would wait until the Chief Security Manager enters the room and ask him/her to fix the problem. :-) – klanomath May 08 '18 at 17:55

2 Answers2

1

This question has been answered here: Changing my administrator user's username has removed privileges

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

Maurice
  • 457
0

I you changed you password from secure mode (CMD+S) then try

sudo su -> then type your password nano /etc/sudoers