No Widgets found in the Sidebar
The New Headless Raspberry Pi Setup

With the recent changes in raspberry pi os the default username ‘pi’ won’t allow login. The New Headless Raspberry Pi Setup 2022

default username ‘pi’ and default password ‘raspberry’ will not work on the new OS

As per the official raspberry blog at https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022 the default username password will no longer be allowed for headless login. This leads the end user in a conundrum as already raspberry pi4’s new HDMI connector cable is not readily available.

Headless configuration

Raspberry Pi Imager tool

For those who run their Raspberry Pi headless and so cannot use the wizard, the Raspberry Pi Imager tool allows you to preconfigure an image with a user account; when such an image is booted, it will boot directly into the desktop, logged in as the user configured in the Imager.

When you’ve chosen the source image and destination in Imager, click the “settings” button – the image of a cogwheel – before clicking “Write,” and use the Advanced options menu to provide a username and password, as well as any other preconfiguration you desire.

This page provides you with almost all the options required to set up a headless raspberry pi.
  1. Check the Enable SSH box and enter the relevant details
  2. Check the Set username and password box and enter the credentials you chose to set.
  3. Check the configure wireless LAN box and enter the credentials of your wifi network
  4. Set the timezone and keyboard layout should you choose to
  5. enable or disable telemetry: this is the usage data send back to raspberrypi.org servers as per their policy document.
  6. click save
  7. Hope you have already selected the rpi version you would like to install from the Operating System menu and correct sd card from the Storage menu.

8. I prefer to download the image first https://www.raspberrypi.com/software/operating-systems/ this avoids any hiccups which may arise due to internet connectivity. Moreover, this enables me to write to multiple sd cards if required.

The manual method

There are additional ways for preconfiguring a setup that does not require the Imager tool – say you already have the pi image installed.

To set up a user on the first boot and entirely circumvent the wizard, create a file called userconf or userconf.txt in the SD card’s boot partition; this is the part of the SD card that can be seen when it is mounted in a Windows or macOS machine.

This file should have a single line of text that says

username:encrypted-password

– that is, your intended username, followed by a colon, followed by an encrypted representation of the password you want to use.

The simplest approach to generate the encrypted password is to use the OpenSSL example below shows a win 10 machine

echo 'mypassword' | openssl passwd -6 -stdin
The userconf.txt file in the boot partition of the sd card.

Do not forget to do the usual tough:

  1. Put an empty file simply named ssh without any extension, in the boot partition of the sd card to enable the ssh. The file does not contain anything in it.
  2. Configure the wpa_supplicant.conf in the boot partition of the sd card.

3. (optional) Assign an IP address to open the cmdline.txt file in the boot partition of the sd card and enter ip=x.x.x.x at the end already present line, after line.target

After booting pi hopefully you can ssh into the same using the username/password you set. To enable or disable more settings you may use sudo raspi-config command to open the RPi software configuration tool.

The New Headless Raspberry Pi Setup 2022 | Rpi.org disowned username ‘pi’

That’s all Folks!

Related Post

Leave a Reply

Your email address will not be published.