In case you have forgotten the root password, the following should do the magic 🪄:
- boot the system from the installation ISO
- upon reaching the network configuration part press the ESC key
- on the Debian installer main menu select "Execute a shell" and continue
- mount the partition by issuing mount -t ext3 /dev/sda1 /mnt (*)
- type chroot /mnt
- issue the passwd command and enter the new password twice
- type exit
- unmount the partition by issuing umount /mnt
- type reboot or telinit 6 to restart the system
*: depending on the format of the disk, there could be "ext4" instead of "ext3" also - if the mounting operations fails, this is the most probable reason.