I have a Pi 400 with a USB drive I boot from. I also have a microSD card with the Pi OS on it. I haven't used the card for a year or more. I now wanted to set things up so that if the card is in the slot, the Pi would boot from it, but if not, boot from the USB drive. I wanted to do this because I discovered the system wasn't set up this way - if the USB drive was connected it would always be the boot volume. I used raspi-config several times to effect the change, to no avail, and simply gave up for a few says. Today I thought I would try again, and started by updating the bootloader, or changing it, I forget the exact wording. Then as I navigated in raspi-config back and forth, pressing return on Advanced Options, the key press got registered as two presses, meaning that "Expand Filesystem" was pressed on inadvertently. When I restarted the Pi, I got into a sort of default OS screen, asking me to enter user credentials to login. I thought I remembered the password, even though I have had sudo setup to not need it, but the password is not being accepted.
I tried to start up from the card, but instead, I was presented with a screen to install a new system. Not knowing what else to do, I installed it. Now I'm typing this on the new system on the card, and hoping some kind person will tell me how I can reset the user password on the USB drive. I have checked the drive on another computer, and it is fine, the files are there. I have done web searches on this, but the search results are nowadays so corrupted and poor, I got nowhere.
-
- Posts: 10
- Joined: Tue Sep 03, 2019 8:29 am
-
- Posts: 10
- Joined: Tue Sep 03, 2019 8:29 am
Re: How to reset user password on USB drive I boot from?
Never mind, have found the answer on AskUbuntu, searching generally for Linux solutions. In case it helps anyone else in this situation, you mount the USB drive while logged in on a card, take note of the mount point in the filesystem and run in the Terminal:
You'll be prompted for the new password and done.
Code: Select all
sudo passwd --root /media/MOUNTPOINT USERNAME