Hi,
rasbian is no langer shipped with the default user pi. A new user must be created during the first logon at the console.
Unfortunately this makes a headless installation not possible.
Raspbian has a method to create a new user within the deployment process.
Here are the steps:
Download the latest image, unzip it, determine your SD Card, and flash the latest image
1 2 3 4 5 6 | root@debdev ~/Downloads # fdisk -l...Festplatte /dev/sdc: 28,93 GiB, 31058821120 Bytes, 60661760 Sektoren...root@debdev ~/Downloads # unxz 2024-03-15-raspios-bookworm-armhf-lite.img.xz root@debdev ~/Downloads # dd if=2024-03-15-raspios-bookworm-armhf-lite.img of=/dev/sdc bs=4M |
When flashing is finshed. Mount the boot partition
1 2 3 4 5 6 7 8 9 10 11 12 13 | root@debdev ~/Downloads # fdisk -l....Disk /dev/sdc: 28.93 GiB 31058821120 bytes, 60661760 sectorsDisk model: USB SD Reader...Device Boot Start End Sectors Size Id Type/dev/sdc1 8192 1056767 1048576 512M c W95 FAT32 (LBA)...root@debdev ~/Downloads # mkdir /mnt/sdc1root@debdev ~/Downloads # mount /dev/sdc1 /mnt/sdc1root@debdev ~/Downloads # cd /mnt/sdc1root@debdev /mnt/sdc1 # export NEW_USER=piroot@debdev /mnt/sdc1 # echo "$NEW_USER:$(echo 'myNewPassword' | openssl passwd -5 -stdin)" > userconf |
And start sshd at boot
1 | root@debdev /mnt/sdc1 # touch ssh |
Also possible…
1 | root@debdev /mnt/sdc1 # echo "$NEW_USER:$(echo 'myNewPassword' | mkpasswd --method=SHA-512 --stdin)" > userconf |
Unmount the sd card
1 2 3 | root@debdev /mnt/sdc1 # cd ~root@debdev ~ # umount /mnt/sdc1root@debdev ~ # sync |
Insert the sd card into the raspberry and enjoy 🙂
Michael