Search This Blog

Thursday, January 29, 2009

Break root password in the linux

METHOD 1 [When you are already login]
Open file /etc/passed
Edit line root:x:0:0:Vikas:/root:/bin/bash
to root::0:0:Vikas:/root:/bin/bash

Edit root line, just delete the char. x.
Save file.
When you boot next time, user root will not ask you the PASSWORD.

METHOD 2 [Change root password before login, even of you do not know the root password]
1) At the grub screen press 'e' on linux
2) Goto line which contains the word 'kernel' and press 'e'
A screen will be displayed with some line.
3) Go to end of that line and write 'linux single' or goto end of line give one space or just type '1'
4) Then press 'esc' twice to come back on grub screen and press 'b' to reboot the system
5) Now wait for the prompt u get, after getting the prompt write command to change the passwd i.e:
passwd root


METHOD 3 [With boot CD]
1. Boot the computer with Linux Installation CD.
2. Enter into Linux Rescue mode by entering the following command in boot screen.
boot: linux rescue
3. When the sh prompt is reached, enter the following commands to change root password.
#chroot /mnt/sysimage
#passwd
The above steps will prompt you to enter your new password.

No comments:

Post a Comment