0

I have a Linux computer, and I recently needed the root password to my system. When I got the computer, I didn't know the root password, and currently need to reset it. I'm thinking I would need to boot it in a recovery mode, and run a command. When I hit shift on my system's splash screen when I start the computer, it opens a NOOBS window, but I'm not sure what to do from there.

For reference, this is what's in /etc/os-release.

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

My Linux kernel release is 4.14.79-v7+.

4
  • 1
    this advise predates NOOBS but may be worth a try: linux.tips/tutorials/… Jun 24, 2022 at 20:09
  • And to accompany the link from @FrankThomas check out this thread on the Raspberry Pi SE site. Jun 25, 2022 at 2:37
  • ok, so on reread, I may have been distracted by the NOOBs and the general change to raspbian that might prevent single-user mode access. if that is the case I apologize. When you boot into raspbian, do you have sudo access? Jun 25, 2022 at 3:47
  • @FrankThomas No, that's why I need the root pwd.
    – Blox
    Jun 25, 2022 at 12:47

2 Answers 2

1

Solved by using the following steps:

  1. Press shift on the splash screen to go into the NOOBS window.
  2. Press e to go into "Edit Config"
  3. Instead of config.txt, open the cmdline.txt file.
  4. Add init=/bin/sh at the end of cmdline.txt.
  5. Press esc to exit NOOBS. You boot in a command line.
  6. Run su root.
  7. Run sudo passwd root.
  8. Follow the prompts.
  9. Restart the computer.
  10. Follow steps 1-3 again.
  11. Remove init=/bin/sh at the end of cmdline.txt.
  12. Press esc to exit NOOBS. Your normal computer boots.
-1

You have access to the system and the shell. That's point A. You drive down the road to NOOB. That's point B. And there you get stuck.

My answer was saying: Try to solve the problem at point A with resetting root password via command line with:

sudo passwd root
4
  • Your original answer was deleted because it is basically a comment and not a definitive answer. That said, you need to earn at leas 50 rep to comment. So that’s that. Jun 25, 2022 at 1:55
  • Ah, I get it. Thx Jun 25, 2022 at 2:08
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jun 25, 2022 at 2:43
  • I dont have sudo access until I find my root password. @ThomasAnderson
    – Blox
    Jun 25, 2022 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .