After you finish imaging microSD card with Debian bullseye for RPi:
Default user name is root
and it is password-less, i.e. when asked for password, simply press Enter key.
You CAN NOT login as root using SSH, but can login as root using monitor and keyboard, and create another user (say pi) and assign it password and add to group sudo. After that reboot. After reboot, you can SSH as user pi
, and disconnect monitor and keyboard.
Connect monitor and keyboard to login as pasword-less user root, and do following:
(1) Create a new user, say pi
and assign it a password.
root@rpi4-20210823:~# adduser pi
Adding user `pi' ...
Adding new group `pi' (1001) ...
Adding new user `pi' (1001) with group `pi' ...
Creating home directory `/home/pi' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for pi
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
(2) Update and install sudo
root@rpi4-20210823:~# apt-get update
root@rpi4-20210823:~# apt-get install sudo
(3) Add pi
to sudoers
pi@rpi4-20210823:~# su -
root@rpi4-20210823:~# usermod -a -G sudo pi
root@rpi4-20210823:~# groups pi
pi : pi sudo
(4) Reboot
(5)Now you can SSH as user pi
using password you have assigned.