scripts icon indicating copy to clipboard operation
scripts copied to clipboard

run the script in root user?

Open zhaob1n opened this issue 3 years ago • 13 comments

on the firmware utility website, it's documented:

Also, you must execute these commands as a normal/non-root user. Running them as root will break things. DO NOT RUN 'SUDO SU' BEFORE RUNNING THE SCRIPT CMD BELOW.

A recent chromeOS dev update seems to disable sudo usage for chronos user. see https://www.reddit.com/r/chromeos/comments/15tnj8i/i_cannot_use_sudo_commands_in_crosh/ https://www.reddit.com/r/Crouton/comments/15aiy80/sudo_cant_enter_chroot_after_update_26_july_2023/

But in VT-2 I can login as root user to use privileged command. What will break if I run the script in root user? And can I modify the script to make it work?

zhaob1n avatar Aug 17 '23 21:08 zhaob1n

I'll need to look into this. For now, you can try replacing the cd; in the script with cd /tmp; and sudo bash firmware-util.sh with bash firmware-util.sh

MrChromebox avatar Aug 17 '23 22:08 MrChromebox

according to the folks at Google I talked to, this change only affects running things via a crosh shell (CTRL+ALT+t).

You'll still be able to use sudo from a VT2 terminal (CTRL+ALT+F2, login as chronos)

MrChromebox avatar Aug 18 '23 15:08 MrChromebox

according to the folks at Google I talked to, this change only affects running things via a crosh shell (CTRL+ALT+t).

You'll still be able to use sudo from a VT2 terminal (CTRL+ALT+F2, login as chronos)

Unfortunately, this is not true. I can't use sudo in VT2 either, and I get the same error message as in crosh.

zhaob1n avatar Aug 18 '23 15:08 zhaob1n

that's not how it supposed to be set up, I'll file a bug so hopefully it doesn't make it to stable channel that way

MrChromebox avatar Aug 18 '23 16:08 MrChromebox

in the meantime, don't use dev channel

MrChromebox avatar Aug 18 '23 16:08 MrChromebox

according to the folks at Google I talked to, this change only affects running things via a crosh shell (CTRL+ALT+t).

You'll still be able to use sudo from a VT2 terminal (CTRL+ALT+F2, login as chronos)

This just does nothing. Either 'emerge-' or 'cros' is not recognized by the system. Clearly, this has not been built as it should have.

daedaevibin avatar Oct 05 '23 22:10 daedaevibin

according to the folks at Google I talked to, this change only affects running things via a crosh shell (CTRL+ALT+t). You'll still be able to use sudo from a VT2 terminal (CTRL+ALT+F2, login as chronos)

Unfortunately, this is not true. I can't use sudo in VT2 either, and I get the same error message as in crosh.

Hello, from my side i was able to use the scripte on the VT2 terminal by using the commande without the first cd, to commande worked with curl -LO mrchromebox.tech/firmware-util.sh && sudo bash firmware-util.sh on an Asus Chromebox 4

ari-shi avatar Oct 06 '23 08:10 ari-shi

according to the folks at Google I talked to, this change only affects running things via a crosh shell (CTRL+ALT+t). You'll still be able to use sudo from a VT2 terminal (CTRL+ALT+F2, login as chronos)

Unfortunately, this is not true. I can't use sudo in VT2 either, and I get the same error message as in crosh.

Hello, from my side i was able to use the scripte on the VT2 terminal by using the commande without the first cd, to commande worked with curl -LO mrchromebox.tech/firmware-util.sh && sudo bash firmware-util.sh on an Asus Chromebox 4

Probably should've mentioned my device is arm64

daedaevibin avatar Oct 06 '23 12:10 daedaevibin

according to the folks at Google I talked to, this change only affects running things via a crosh shell (CTRL+ALT+t). You'll still be able to use sudo from a VT2 terminal (CTRL+ALT+F2, login as chronos)

This just does nothing. Either 'emerge-' or 'cros' is not recognized by the system. Clearly, this has not been built as it should have.

I have no idea how either of those is relevant to running my script

MrChromebox avatar Oct 06 '23 14:10 MrChromebox

closing as the solution to running the script in R117+ is to use VT2

MrChromebox avatar Oct 14 '23 22:10 MrChromebox

Sorry for posting a comment here, but does anyone know what the default password for chronos would be? No password doesn't work.... And it's asking me to login to the shell via VT2

EDIT: Nevermind, I had to press ctrl + alt + refresh (no right arrow) then I can type in root without a password and afterwards do chromeos-setdevpasswd, that fixed it. The one with right arrow doesn't seem to work out...

Simbaclaws avatar Oct 17 '23 20:10 Simbaclaws

I'm having an issue. No password for root and chronos are both not working. What should i do?

Legomountain14 avatar Aug 22 '24 01:08 Legomountain14

I'm having an issue. No password for root and chronos are both not working. What should i do?

power wash and not enable things you don't understand next time (ie, do NOT enable ChromeOS Debugging options)

MrChromebox avatar Aug 22 '24 02:08 MrChromebox