Sudo not working anymore

Hi,

it appears sudo doesn’t work anymore. i’ve got now the message:
Sorry, user umbrel is not allowed to execute ‘xxxxxxxxxx’ as root on umbrel.
while it was working a few days ago.

i suspect a syntax mistake on the file i edited (sudo nano /etc/sudoers.d/010_pi-nopasswd) to be able to crontab a script.
Since then i can’t do sudo visudo or edit the 010_pi_nopasswd.

My question is:
what is the default root password when we install umbrel ? (i never had to use it until now).
i then would be able to correct the bad syntax if i can edit 010_pi_nopasswd as root.
Right now i’m stuck and no more sudo is possible.

there might be also another solution i’m not aware of…

Thank you in advance for your help…

I would try pkexec visudo
EDIT: Use the 2 terminal window trick below this comment!

Always use visudo if you’re editing the sudoers file, no matter what anyone says. I’ve made the same mistake, so don’t feel bad. The default root password is not enabled, as it doesn’t let you login directly to root, only by sudo su .

Thanks DHD,
unfortunatly pkexec gave the same result:
Error executing command as another user: Not authorized

i had tried to used visudo while editing sudoers file but i don’t remember why it was not possible (maybe i missed something)…

when you say reflash the microSD card does it means i’ll lose everything ?
i mean i’ll have to restart and try to restore the channel or (hopefully) i just get back the environnement clean with no more actions ?

Hold on, I might have found a workaround.

  1. Open up 2 terminal windows (SSH into the node twice).
  2. On the second terminal window: Type echo $$ – it will give you a process ID
  3. On the first terminal window: Type pkttyagent --process #####
    3a) The ##### is your process ID from the second terminal window
  4. The second terminal window will give you a blinking box cursor.
  5. Go back to the first terminal window, and type pkexec visudo
  6. The second terminal window will prompt you for the password for the user umbrel.
  7. As soon you enter the password for umbrel on the second terminal window, it’ll bring up visudo on the first terminal window.

If you want to thank the person who came up with this workaround: You can do that here: https://github.com/NixOS/nixpkgs/issues/18012#issuecomment-335350903

i tried several times the process but i still get the message:
Error executing command as another user: Not authorized

i guess unfortunatly i have to reflash.
Do you have any information on my 2 questions about reflashing ?
except if you have another idea …

You shouldn’t lose any of your channels, as that’s stored on the SSD, the microSD card contains the operating system. But let’s wait until someone else chimes in to make sure, because I haven’t had to deal with an issue like this one.

ok thks,

anyone with a solution ?

@DHD is right. All data is stored on the SSD and the microSD only contains the OS. So feel free to try a reflash, that will most likely fix your issue.

Thanks Mayank,

i’ll try it soon…

Hi just wondering what is the default root password?