Hello,
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:
- reboot server, so I can
-
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.
-
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.
init=/bin/bash -
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!