Password recovery

Last summer I got a bit paranoid and created a very strong password for my laptop. I used a random generator to create an extremely strong password and for safety reasons I did not write it down. After a few weeks of vacation I forgot of course the password. I could have reinstalled the operating system but I was not in the mood to search for and reinstall all the software that I had on my laptop. I just wanted to have full access again to do some updates. The laptop did not have any other operating system installed. It had an internal DVD-driver but I was not sure if it was working or were my bland DVDs were. The BIOS was resent enough to allow booting from a USB pen drive. I also had another PC with Linux on it available.
1 answer

Boot stick

To solve the problem at hand:
*) Get a USB pen drive.
*) Install a minimal Linux system on using a tool like Unetbooin or use a Live-image provided by a Linux distribution.
*) Set the bios on the laptop to boot from the pen drive.
*) After booting the live system on the laptop there are to possibilities:
a) Editing the file /etc/passwd on the installed operating system to disable the password check for the root account.
b) Using chroot to switch into the environment of the installed operating system. Run passwd to set a new password you can remember.

To prevent problems like this in the future:
*) Don't use 20 character passwords that are completely random.
There are password generators that produce pronounceable passwords, those are much easier to remember.
*) Allow your account to use sudo.

Taggings: