Resetting root password in Linux using Backtrack

backtrack

Steps for resetting password of root to ‘sctfroot’ using backtrack.

Step1: Boot the backtrack cd and log in as root.

Step2: find the partition in which the linux is installed using cmd
$fdisk-l                                        //we are already loged in as root hence its not required to use sudo cmd anywhere.

Step3: suppose linux is installed in partition /dev/sda6 then make a directory name sda6 in mnt directory and mount that partition to it using following cmd(s)
$mkdir /mnt/sda6                             //make sda6 in mnt directory  
$mount /dev/sda6 /mnt/sda6

Step4: cd /mnt/sda6                                  //entering in sda6

Step4: change the permission of passwd file to 755
$chmod 755 passwd                             //check comments in step2

Step5: open passwd file
$vi /etc/passwd

Step6: Find root and delete the whatever is there in between the first ‘:’ and second ‘:’ and save the file.It will make the root password less.
root:x:0:0:root:/root:/bin/bash                //before

root::0:0:root:/root:/bin/bash               //after 

Step7: Now remove backtrack and restart the computer and open in grub mode(recovery mode) and you will find the root prompting at cmd line without asking for password.Now use passwd cmd to change passwd of root to sctfroot.

$passwd root
and type password as ‘sctfroot’ when it is asked.

Note: You can prevent him from hacking your sytem by setting a Bios password(so that he can’t access your system without cracking your bios password 😀 ).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s