Reset user password on Debian Squeeze

Sometimes as an IT Administrator you are requested to reset a user password. Here is how I did it:

1.  Boot grub and choose recovery mode and do not press enter.

resetpwd_012. Press “e” key, go to the end of line “linux /boot/vmlinuz-…” and add a space (press spacebar once) and type “init=/bin/bash” and press “Ctrl-x” to boot.

resetpwd_023. After finished booting, type “mount -rw -o remount /” and press enter.

resetpwd_034. Type “passwd <username>” and press enter. Replace <username> with the real username whose his/her password needs to be resetted.

resetpwd_045. Type in a new password and press enter.

6. Type in the same password for confirmation and press enter.

7. Type “reboot”.

8. That’s it!