Single USer Mode:
Single user mode is also known as Runlevel-1 in unix operating system.
Single user mode is used in situation when user cannot login into the system.
We can change the root password by using single user mode in unix/linux.
Follow the steps to change the root password by using single user mode or runlevel-1:
Step1: start your system and press”Shift” key continuously, once grub loader come then
Step2: select first line (i.e Ubuntu,with Linux 3.2-generic-pae)
Step3: Press ‘e’ to edit the grub
Step4: go to “linux /boot/vmlinuz-3.2………….. ro quite splash $vt_handoff”
Step5: Replace “ro quite splash $vt_handoff” with “rw init=/bin/bash”
Step6: After that press “cltl-x” to boot with single user mode
Step7: you will get prompt of single user mode.
Step8: type command
it will ask for new password
Step9: After that sync and reboot the system