Reset chromeos developer mode password for root if forgot

505 views
Skip to first unread message

Stanley Searles

unread,
Oct 25, 2023, 9:34:33 AM10/25/23
to chromiu...@chromium.org
Hello everyone, 

I seem to have lost my root password for chromeos and I've changed it, so test0000 doesn't work anymore. Do I have to wipe my whole chromebook and factory reset it to be able to get into root again or are there other, more comfortable options? 

Thanks in advance for your help!

Best regards, 

Stanley C. Searles

Denny Lockhart

unread,
Oct 25, 2023, 10:19:14 AM10/25/23
to ChromiumOS Development, Stanley Searles
Without `cros-flash` I don't think you can short of a powerwash or recovery.
See these links:

~DennyL

Sage, Russ

unread,
Oct 25, 2023, 5:25:19 PM10/25/23
to Denny Lockhart, ChromiumOS Development, Stanley Searles

Assuming you are in dev mode, you can boot an image from a usb stick and then mount the root partition. Go into etc/shadow and delete the password. Reboot and login, then set a new password. I don’t remember the partition number to mount, can probably get it from the running system.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

dragon788

unread,
Oct 25, 2023, 9:14:36 PM10/25/23
to Sage, Russ, Denny Lockhart, ChromiumOS Development, Stanley Searles
But if you haven't set the rootfs to rw and disabled verity already don't you run the odds of triggering a wipe?

Denny Lockhart

unread,
Oct 26, 2023, 10:12:55 AM10/26/23
to ChromiumOS Development, dragon788, Denny Lockhart, ChromiumOS Development, Stanley Searles, Sage, Russ
Russ,

chromeOS doesn't use /etc/passwd or /etc/shadow when using this Debugging option, instead it uses the chromeos-setdevpasswd script and the file shown below:

  • PASSWD_FILE='/mnt/stateful_partition/etc/devmode.passwd'

It sets a password using openssl.

You can this in the attached file.

~DennyL

chromeos-setdevpasswd

Sage, Russ

unread,
Oct 26, 2023, 2:49:29 PM10/26/23
to dragon788, Denny Lockhart, ChromiumOS Development, Stanley Searles

I was describing the general process. Without sitting down and going through it I can’t say all the nuances. But the issue of rw is only in the context of the running os. When you boot an image from a stick, that is the running os (with a locked down filesystem). When you mount the original root partition from the nvme, you are mounting it rw. So no issue with permissions or verity.

Reply all
Reply to author
Forward
0 new messages