How to change recover root password in single user mode in Debian OS

To change/recover root password in Debian,

1) Boot server into grub, select single user.

2) Press e to enable edit mode. Scroll down to the kernel line which starts with “linux /boot/vmlinuz-2.x…….”

Scroll to the end of that line and press space key once only and type

init=/bin/bash

3) Press Crtl x to boot

4) Remount '/' partition

$ remount / as rw
$ mount -rw -o remount /

5) Change password with command

$ passwd

You're done !

Share on Facebook0
Share on Google+8Tweet about this on TwitterShare on StumbleUpon0Share on LinkedIn0Share on Tumblr0Digg thisPin on Pinterest0Share on Reddit0Email this to someonePrint this page

About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA