6

What is the default root password for raspbian jessie or debian 9?

I have Raspbian Jessie stretch iso "Raspberry Pi Desktop" or pixel Virtualbox and I need to install keys with root "su", what is the default password since raspberry nor pi aren't working.

5 Answers 5

12

From the offical documentation:

Linux users

User management in Raspbian is done on the command line. The default user is pi, and the password is raspberry.

Root user/sudo

You won't normally log into the computer as root, but you can use the sudo command to provide access as the superuser. If you log into your Raspberry Pi as the pi user, then you're logging in as a normal user. You can run commands as the root user by using the sudo command before the program you want to run.

You can also run a superuser shell by using sudo su. When running commands as a superuser there's nothing to protect against mistakes that could damage the system. It's recommended that you only run commands as the superuser when required, and to exit a superuser shell when it's no longer needed.

1
  • Run sudo -i or sudo -s if possible, though instead of sudo su that is using 2 different programs to do what the former is already capable of.
    – Totor
    Jan 2, 2022 at 12:08
2

Elaborating on GAD3R's answer. To change my Raspberry Pi root's password, I first typed sudo su, gave it the default raspberry password for pi user, got to the root's prompt, typed passwd there and changed my root password as desired.

1

You can end up in emergency mode if you botch fstab. It REQUIRES the root password to continue ... so it would be nice to know the root password, unless you've set it with passwd.

You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to try again to boot into default mode. Give root password for maintenance (or press Control-D to continue)

0

Log in as user "pi" and password "raspberry" and THEN "su" to have superuser (SU) privileges. I do not believe there is an actual "root" login, but I could be wrong.

Edit, did you google this at all? https://www.raspberrypi.org/forums/viewtopic.php?t=136199

2
  • Thanks for the link, I did google su root password but every answer was about using substitute user with sudo -i and not the actual su root which prompted for a password but I couldn't figure which one it was. I found out like GAD3R mentions su root is disabled and you can enable thru sudo, see link cyberciti.biz/faq/change-root-password-ubuntu-linux anyways I couldn't run the keyserver with su so It worked with sudo -1 but the question was specificly about su root password which was not raspberry in that case.
    – Juan Ojeda
    Apr 19, 2019 at 22:15
  • I really don't think you understand how SU, ROOT, and logins work in the Linux environment, but that's cool, glad you got it figured out one way or another. Apr 20, 2019 at 22:30
0

In raspbian, you can reset the root password:

sudo passwd root

Then, the console write:

New password:

Write a password for root and then, the console write:

Retype the new password:

You must write the password you decided. If there is no errors you have this console message:

passwd: password updated successfully

Now the password is reset.

If you login into root with a GUI, press Ctrl+Alt+Del for disconnect beacause you don't have taskbar.

1
  • P.S: Thanks AdminBee to correct heading in my answer Jan 5, 2022 at 14:18

You must log in to answer this question.

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