Reset root password for Linux

62
rate or flag this page

By sivamanis09


Reset root password

I use both Redhat linux windows xp operating systems in my pc . I know the techinique of restting root password of linux operating system . It will be useful when u have forgotten  password of ur linux system .

to do this follow these steps

1.while booting the grub loader press 'e' to edit the grub entry

2.now u'll see a two options and selcect the one which is like

kernel /boot/vmlinuz -2.26.9-22.EL ro root=LABEL=/  rhgb quiet

3.Press spacebar and enter 's' (i.e append S at the end of this line)

4.Next press Enter followed by 'b' for booting then u'll get command prompt after some time .

5.Enter the command  

# passwd  root

it will ask for ur new password enter and confirm it .thats it ur password is changed

U can also disable this method to prevent others from resetting ur root passwd

for this u have to set up a GRUB password , for this

1.login as root and and open the terminal

2.Type 'grub' command and enter .it will show GRUB prompt

3.Type md5crypt and press enter

4.Now it will ask for GRUB password . enter password, u'll get encrypted password. copy it and exit grub prompt by typing quit

5.Next execute the following commands in terminal

# cd /etc/

# vi grub.conf

then copy the encrypted password in line which is like

password omd5 $1$............ 

pess  escape and shift+ : (colon) next type 'wq' to save and quit the grub.conf file .thats it.from next time onwards it asks for grub password for booting.

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

No comments yet.

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working