With the recent changes in raspberry pi os the default username ‘pi’ won’t allow login. The New Headless Raspberry Pi Setup 2022
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.
- Check the Enable SSH box and enter the relevant details
- Check the Set username and password box and enter the credentials you chose to set.
- Check the configure wireless LAN box and enter the credentials of your wifi network
- Set the timezone and keyboard layout should you choose to
- enable or disable telemetry: this is the usage data send back to raspberrypi.org servers as per their policy document.
- click save
- 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
userconf.txt
file in the boot partition of the sd card.Do not forget to do the usual tough:
- 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. - 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.

That’s all Folks!