Recovery in bootup menu

Started by Seadevil, 2023/06/18, 18:15:53

Previous topic - Next topic

Seadevil

There is NO recovery option in the Advanced section when i boot up.  So i cannot get into
recovery mode.

am trying to fix "USERNAME is NOT in the sudoers file.

any prompt help here is appreciated

Thanks

devil

We do not set up sudo, as we believe it is way to heavy. We offer a real, root or doas as alternatives. If you want sudo, you have to set it up yourself. There is hundreds of instructions like this on the net: https://medium.com/platform-engineer/how-to-enable-sudo-on-a-user-account-on-debian-494d3c75ee21




dibl

Quote from: Seadevil on 2023/06/18, 18:15:53
.... So i cannot get into
recovery mode.

am trying to fix "USERNAME is NOT in the sudoers file.

@devil was faster than me, but I will post a reply since it was already written.


Yes, you CAN log in, as root, in tty1:


On the grub boot menu, which will highlight the top line, press "e", cursor down to the end of the line that begins

"linux  /boot/vmlinuz-xxxxxx"

At the end of that line, add a space and the number "1". Then press Ctrl-X, and you will boot to the root login.

To add your user to the sudo group, the command at the root prompt is:

"# usermod -aG sudo username"

After that, you can enter "systemctl reboot" and the system will reboot and you can then boot to the GUI and in the terminal you can use "sudo" commands as needed.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

Seadevil

Hello  dibl

thank you for the instructions.  I am STILL having a problem.

sudo su
[sudo] password for dave:
dave is not in the sudoers file.
This incident has been reported to the administrator.
dave@primary:~$ \


I think it may be this line you provided. 


To add your user to the sudo group, the command at the root prompt is:

"# usermod -aG sudo username"


Do i need the quotes" ??   i tried with and without quotes.   i entered:   # usermod -aG sudo username

i entered  # usermod -aG sudo dave

neither one worked. 

what am i doing wrong ?


edlin

# is only the prompt for root.
Please use the following command as root:
usermod -aG sudo dave

edlin
,,Ein kluger Mann macht nicht alle Fehler selber. Er lässt auch anderen eine Chance."

Winston Churchill

Seadevil

ok  thanks for that info

duh,   didn't have enough coffee this am.   lol.

anyway, i solved my problem from another google search.

someone said  to  add: 

   If you keep typing sudo, the line
alias sudo="doas"
in your .bashrc will help.

and it did !!   now i can type  sudo apt install  ....anything....and it works fine.

I have been typing sudo  for  20 years  and hard to change  ......old habits die hard.   lol.

dibl

Quote from: Seadevil on 2023/06/19, 19:34:14



Do i need the quotes" ??  i tried with and without quotes.  i entered:  # usermod -aG sudo username

i entered  # usermod -aG sudo dave


No quotes. You did it correctly. You would have to reboot for the change to be effective in your booted session -- that may have been your problem.

Also, where I wrote to put a "1" at the end of the kernel boot line in grub, that was wrong -- must have been a senior moment. You put a "3" there and then you boot into run level 3, which is the multi-user with networking run level.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

towo

#7
And for recovery enrties:


sed -i 's/GRUB_DISABLE_RECOVERY/#GRUB_DISABLE_RECOVERY/' /etc/default/grub
update-grub

All has to be done as root!
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.