Sudo doesnt work

176 views
Skip to first unread message

Elliot Grutsch

unread,
Nov 22, 2023, 10:53:33 PM11/22/23
to ChromiumOS Discussion

crosh> shell
Sudo commands will not succeed by default.
If you want to use sudo commands, use the VT-2 shell
(Ctrl-Alt-{F2/Right arrow/Refresh}) or build the image with the
login_enable_crosh_sudo USE flag:

$ USE=login_enable_crosh_sudo emerge-$BOARD chromeos-login
or
$ USE=login_enable_crosh_sudo cros build-packages --board=$BOARD
   

Mike Frysinger

unread,
Nov 22, 2023, 11:09:39 PM11/22/23
to realelliot...@gmail.com, ChromiumOS Discussion
sorry, but did you have a question ?
-mike

THE TROLL

unread,
Nov 23, 2023, 1:26:10 PM11/23/23
to ChromiumOS Discussion, Mike Frysinger, ChromiumOS Discussion, realelliot...@gmail.com
he seems to be wondering how to disable the no_new_privileges flag, which is what keeps the sudo prefix from running as root.

THE TROLL

unread,
Nov 23, 2023, 1:26:11 PM11/23/23
to ChromiumOS Discussion, Elliot Grutsch
Unfortunately, the easiest way to use sudo commands(without rebuiliding the OS image) is to launch a VT2 shell by pressing CTRL+ALT+F2/right arrow. You should see black screen that says Developer console at the top. This is the VT2 shell, and most alt-os/alt-firmware solutions have moved over to this shell. You should see localhost login: at the last line of instructions. You can login as chronos for a normal shell or root for a superuser shell.
Reply all
Reply to author
Forward
0 new messages