If you don’t know the root password of Debian, how are you going to change it? You need to know a method of password recovery for the Debian Linux operating system.
What this method does is reboot your machine into what is called “single user mode”. Single user mode is also referred to as maintenance mode and is runlevel 1.
First reboot the Machine
What you need to do is to get to the screen that allows you to select which kernel to boot.
set the arrows to select the kernel entry you want to modify.
press “e” to edit the entry
use the arrows to go to “kernel line”
press “e” to edit this entry
at the end of the line add the word
init=/bin/bash
press “ESC” to go back to the parent menu press “b” to boot this kernel
Your machine will now start the single user boot process.At this point all you need to do the following commands.
#mount -o remount,rw /
#passwd
If password command is not found.Type below details:
#mount -t <file system type:eg:-ext3> <device,:eg:-/dev/sda1> </usr>
Then type password command.
#passwd
You are successfully changed the password.
Now reboot
Now i am thinking why all this passwords!!!?
use
init=/bin/bash rw
then you can avoid the step
mount -o remount,rw /
Thank you Sreenadh.It is also worked.