<username> is not in the sudoers file. This incident will be reported


I have manjaro xfce booted to a live CD and I accidentally used this command:

sudo usermod -G uucp $USER

which gave me this output whenever I tried to use use and it’s password:

is not in the sudoers file. This incident will be reported

To fix this I would like to get a root shell with ‘su’ and then use:

usermod -a -G sudo

However, I cannot access my root shell because when I use ‘su’ I get an authentication error because every default root password I tried to find doesn’t work.

So in order to fix this, I need to “boot up as root by changing a boot parameter on grub” by following a guide.

Although with my Lenovo Thinkpad T420 I am not sure how to follow the step 1 and 2 even. I’m not sure what the grub-boot loader screen is supposed to look like so I can enter recovery mode.

I am not sure how to:

  1. reboot server, so I can
  1. See the grub-boot loader screen. Select Recovery mode and the version of the kernel that you wish to boot and type ‘e’ for edit. Select the line that starts with ‘kernel’ and type ‘e’ to edit the line.

  2. Go to the end of the line and type init=/bin/bash as a separate one word (press the spacebar and then type init=/bin/bash). Press enter key to exit the edit mode.

  3. You will be back at the GRUB screen, type ‘b’ to boot into single-user mode. This causes the system to boot the kernel and run /bin/bash instead of its standard init. It will allow us to gain root privileges (w/o password) and a root shell.

Any help or guidance would be greatly appreciated.

Feel free to ask me anything so I can help you help me troubleshoot!

Welcome to the forum! :slight_smile:

If you did that in a terminal in the live session ─ as opposed to in a chroot environment ─ then there’s nothing to fix. The live session runs off of a read-only medium.

The root password for the live session is the same as that of the unprivileged account. :wink:

Since none of the root passwords were working, I just needed to get to the GRUB menu when restarting my PC, and I finally figured out how by repeatedly pressing ESC after restarting it.


sudo and su work without a password in the xfce live cd
I have used the architect installer (as a separate iso, not the one included in every current edition iso) - and there was a message telling me that the password for root as well as manjaro was “manjaro”.

If you want the GRUB menu visible at every boot, edit /etc/default/grub and change the line…


… into…


Save the file and then run… :arrow_down:

sudo update-grub
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.