While the latest version of Raspberry Pi OS (formerly known as Raspbian) no longer features a default 'pi' user and password, requiring you to set up a new user and password upon first booting up, earlier versions of the operating system still have one. And as you probably know, leaving the default password on anything is incredibly insecure.

Since it's easy to find the stock credentials for all sorts of devices online, anyone with malicious intent will certainly try them first. If you forgot the default password for your Raspberry Pi, or never changed it, we'll show you what you need to know, including the Raspberry Pi OS / Raspbian default login details if you're still running an older version of the operating system.

The Default Username and Password on Raspberry Pi OS

In earlier versions of the official Raspberry Pi OS, previously known as Raspbian, the default Raspberry Pi login details are as follows: the default username is pi and the default password is raspberry.

To protect your Raspberry Pi from online threats, you should immediately change the Raspberry Pi OS / Raspbian default password. When you first boot up Raspberry Pi OS, its Welcome Wizard will prompt you to do so, but you might still be using the default if you installed the OS a while ago or skipped changing it.

If doing a fresh OS install to a microSD card, you can use Raspberry Pi Imager's advanced options to set the username and password in advance—and will need to do so to enable SSH.

How to Change the Password

Here's how to change the password for Raspberry Pi in Raspberry Pi OS (Raspbian). When logged in, open a Terminal window and enter the command:

        passwd
    

When you press the Enter key, the system will prompt you to confirm your current password. After this, enter your new password twice, pressing Enter after each entry. As is the Linux standard, you won't see any characters on screen while entering this password.

Raspberry-Pi-change-password-1

If everything worked properly, you'll see a "password updated successfully" message. This means that you're good to go with the new password. Make sure you remember it!

Remove Password

For reference, if you ever need to remove the password from an account on your Raspberry Pi, you can use the command:

        sudo passwd [USERNAME] -d
    

Of course, it's wise to keep a password on all accounts.

Add User

You can add new users to your Raspberry Pi with the command:

        sudo adduser [USERNAME]
    

You’ll be prompted to set a password for each user. Looking for other useful commands? Check out this guide to Raspberry Pi terminal commands.

For security reasons, it's also important to update your Raspberry Pi regularly.

Change the Default Password for Raspberry Pi OS: Success

Changing the Raspberry Pi 4 default password (or that on any other model) is only one of the many ways you should ensure that your Raspberry Pi is secure, so take a moment to check yours.