A buddy of mine recently forgot his backtrack4 password, and wanted to reset the password, but couldn't log in (even under single user mode). The easiest way to do this is to boot to a knoppix cd/thumb, mount the root partition of the box you forgot the password on, then delete the shadowed password.
For example,my /etc/shadow entry for "root" account may look likethis:root:$1$BuPbmLAz$1G7.evIChyqaEI0TlZp0F.:11071:0:99999:7:-1:-1:134540356
andafterthe password is erased, it looks like this:
root::11071:0:99999:7:-1:-1:134540356
This will allow you to log right in with no password, then simply passwd to add whatever password you like.
For example,my /etc/shadow entry for "root" account may look likethis:root:$1$BuPbmLAz$1G7.evIChyqaEI0TlZp0F.:11071:0:99999:7:-1:-1:134540356
andafterthe password is erased, it looks like this:
root::11071:0:99999:7:-1:-1:134540356
This will allow you to log right in with no password, then simply passwd to add whatever password you like.
Comments
Post a Comment