Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change root password from grub
01-19-2010, 08:36 AM (This post was last modified: 01-19-2010 08:43 AM by codecaine.)
Post: #1
Change root password from grub
If you are dual booting with grub and you forgot you linux root password you can change it like so. Choose linux to boot up and press e on it. On the command line type this. Where new password here is you type whatever password you want.
Code:
init=/bin/bash
passwd new_password_here

Another way is to boot a linux live cd and mount your linux drive and go to /etc/shadow and delete the password line so the password will be empty. Example of a user in the /etc/shadow file

root:dsfDSDF!s:12581:0:99999:7:::

The password is between the first two : : which is dsfDSDF!s so you will change it to this

root::12581:0:99999:7:::

and save the file
Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2010, 11:19 PM
Post: #2
RE: Change root password from grub
Great code !

"I dont know with what weapons World War 3 will be fought with, but i know World War 4 will be fought with stones and sticks" - Albert Einstein
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 Quick Theme: