Major Changes to Raspberry Pi Setup Steps

Raspberry Pi 4 Single Board Computer

The Raspberry Pi family of single board computers (SBCs) is a resource I’ve covered quite a bit.  These SBCs have numerous wired and networking capabilities making them strong candidates for a wide range of uses.

Recent cybersecurity improvements to the Raspberry Pi Operating System (OS) have changed the requirements for initializing Raspberry Pis from scratch.  Mainly, it did so by removing the default pi- raspberry username-password combination and the user account it belonged to.  While I recommend you check the official source for full details, this project will show how the process changed since April 2022.

Notice of Non-Affiliation and Disclaimer: As of the publication date, we are not affiliated with, associated with, authorized with, endorsed by, compensated by, or in any way officially connected with Raspberry Pi, Raspberry Pi Foundation, PuTTY or Microsoft, or their owners, subsidiaries or affiliates. The name Raspberry Pi, Pi Imager and Raspberry Pi OS as well as related names, marks, emblems, and images are trademarks of their respective owners.

External Links: Links to external web pages have been provided as a convenience and for informational purposes only. Unboxing Tomorrow and Voxidyne Media bear no responsibility for the accuracy, legality or content of the external site or for that of subsequent links. Contact the external site for answers to questions regarding its content.

As usual, for any conflict between the unofficial instructions here and the official instructions by Raspberry Pi, refer to the official sources instead.

Learning the Hard Way

In my case, I had already used Raspberry Pi Imager version 1.5 to flash (i.e. reprogram) my microSD card for use in the miniaturized Raspberry Pi Zero W.  My intent was to use the old method, except this time I was greeted with “access denied” messages with no further instructions.

Figure 1: Failed Login Attempts over an SSH Session

How to Remedy

The official Raspberry Pi blog recommends users create a fresh account with a unique username-password combination.

Back Up Your Data

To remedy, visit the official website and prepare to download a newer version of the Raspberry Pi imager that supports the new login policy.  As of May 2022, that is version 1.7.2.  The official bulletin titled “An update to Raspberry Pi OS Bullseye,” explains the reasoning for this update in detail.  For now, this guide will focus on getting the Raspberry Pi running.

Foremost, Raspberry Pi Zero W supports High-Definition Multimedia Interface (HDMI) monitors and keyboard/mouse combinations over its Universal Serial Bus (USB) connector.  However, my goal was a “headless” Raspberry Pi setup which uses a remote connection over Secure Shell (SSH) rather than a keyboard/mouse combination…

Materials Used

  • Raspberry Pi Zero W
  • microSD card
  • microSD card reader
  • USB micro B connector for supplying power
  • Wi-Fi home network or mobile hotspot (with admin rights)

Step 1: Prepare a microSD Card

Obtain a microSD card.  The ideal card capacity depends on your intended usage and operating system.  However, most of my projects use high-endurance, class 10, 32 GB microSD. 

Data deletion warning: The later steps of this guide will erase and overwrite all data stored on the microSD.  If your microSD contains valuable or irreplaceable data, consider using a different card or back up your data.

Step 2: Download the Latest Pi Imager Application

Go to the official Raspberry Pi webpage and navigate to the software section.  You should see an area for downloading the latest copy of the Raspberry Pi Image application for Windows.  The latest version as of April 2022 is version v1.7, which is recent enough to overcome the username change.

Download it and scan with your favorite anti-malware tool(s).  If things look okay, proceed.

Step 3: Attach the microSD Card

Connect the microSD card to your Windows desktop if you haven’t already.  To avoid overwriting the wrong device, it’s a good idea to eject and unplug any unrelated mass storage devices such as cameras or other microSD cards, in case we select the wrong one later.

Step 4: Install and Open the Pi Imager Application

Install the Pi Imager application using the setup Wizard. 

Figure 2: Setup Wizard for the Pi Imager Application

Open the Pi Imager application.  You should see a line of 3 buttons:

Figure 3: Pi Imager Application Version 1.7.2

Step 5: Choose OS

Select the Raspberry Pi OS version that best describes your raspberry pi and your own software needs.

Figure 4: Operating System Selection

Step 6: Choose Storage

Select the microSD card of interest.  Double-check any selection you make, because overwriting the wrong drive cannot be undone.

Step 7: Setup

By now, there should be a 4th button with a gear icon on the Pi Imager application.  Click it, and then fill in the text fields as best you can–especially if you wish to connect remotely.

Step 8: Write and Eject

Data deletion WARNING: This step WILL erase any data already stored on the microSD card.  If that is what you want, then proceed.

Click the write button to erase and overwrite the selected microSD card with the selected operating system.  Be prepared to wait several minutes.

When the write processes has completed, eject the microSD card from your system and insert it in a Raspberry Pi of interest.  Power on the Raspberry Pi, and within a few minutes (or seconds) your Pi should display an image or appear on your network.

If you’re connecting a keyboard and monitor to your Raspberry Pi, then you are effectively done at this point.

Circumstantial: Setting up Remote Operations over SSH

If you are operating over SSH, you will need to log into your Wi-Fi router’s admin account or mobile hot spot.  Be prepared to recall the hostname you chose for the Raspberry Pi since that is how it will be displayed on your Wi-Fi router or smart phone.

Record the internet protocol (IP) address your Wi-Fi router or mobile hot spot has assigned to your raspberry pi.  This is the address you will need to access it remotely using a program such as PuTTY for Windows (available at: https://www.putty.org)

Circumstantial: Connections using PuTTY

Download and scan the PuTTY application.  If things look okay, then you can proceed.

  • Launch the PuTTY application
  • Enter your Raspberry Pi’s IP address
  • Set the port to 22
  • Click the connect button

You should see a prompt requesting your username.

Log in using your own username-password combination.  If the login was successful, you should now see a welcome message in the terminal.

Options from Here

Generally, it’s wise at this point to update your Raspberry Pi to the latest software packages using the following case-sensitive commands…

sudo apt-get update
sudo apt-get upgrade

All commands in Raspberry Pi OS are case-sensitive, so keep this in mind if you are new to Linux distributions.  After the update, you may want to reboot the system using…

sudo reboot

Or shutdown and power off using…

sudo shutdown -h

Or shutdown without powering off using…

sudo halt

You can adjust additional settings, add additional wireless networks, or change your password yet again by typing…

sudo raspi-config

For the system setup dialog.

Remarks and Feedback

Raspberry Pi forums users have rightfully pointed out that this will catch users off-guard.  After all, the pi-raspberry account has been there for over a decade, and there’s no prominent mention anywhere near the downloadable image.  If nothing else, I would expect a change this significant to have some kind of bulletin where people will realistically read it.

Important Notice: This article and its contents (the “Information”) belong to Unboxing-tomorrow.com and Voxidyne Media LLC. No license is granted for the use of it other than for information purposes. No license of any intellectual property rights is granted.  The Information is subject to change without notice. The Information supplied is believed to be accurate, but Voxidyne Media LLC assumes no responsibility for its accuracy or completeness, any error in or omission from it or for any use made of it.  Liability for loss or damage resulting from any reliance on the Information or use of it (including liability resulting from negligence or where Voxidyne Media LLC was aware of the possibility of such loss or damage arising) is excluded.