Old iMac shows password lock screen when booting from USB
So I have an old 2007-08 iMac. I was planning on fixing it and giving it to my sister, since she thinks she can put good use to it. What are it’s problems? Well it has a dead hard drive, only 2 gigabytes of ram, and it really needs to get it’s components replaced. So I have an external hard drive and a Mac OS Yosemite install drive and was planning on putting the os in the external drive. But when I turned it on, it showed me a password entry screen. I didn’t really think much of it, since I actually remembered the password. It ended in 1432 or 1423. But when I pressed enter, they both did not work. It didn’t even show an error screen. I know I can run the os from an external drive, since I did that before it failed. And I encrypted the external drive with the os installed. Which leads me to now. So I’m wondering now if it stored my password data on the boot partition. But since there are no more boot partitions because of my hard drive failing, that means the ability to enter a password is lost. And I dont know what to do. So can anyone help?
Picture of locked screen. Sorry for the terrible lighting.
iMac