Hi, are you the same person who emailed me earlier? Regardless, someone
emailed me today with the exact same question about how to recover access to
their user account.
I'll paste what I emailed to that person:
If it isn't encrypted, then you could do this:
boot a live USB distro (e.g. trisquel)
mount the OS drive
edit /etc/shadow:
Make your entry in there look something like this:
koude::::
(koude is the username is this example. it's the dutch word for "cold")
edit /etc/passwd
Your entry will look something like:
koude:x:1007:1007::/home/koude:
Change it to:
koude::1007:1007::/home/koude:
(I removed the "x")
then boot up the system, but with this kernel parameter added:
init=/bin/bash
Then you have a root shell at boot.
You can then do:
passwd yourusername
You can do this on any user account on a GNU+Linux system. This will
completely remove your password. Then you can reset it to whatever you
like.
NOTE: Trisquel has no root account by default. To enable the root
account (during normal operation) you can simply set a passwd:
passwd root
This ought to work. I've used this to break into my systems from time
to time, when I forget my password.