[ListLayout]
×

How to Recover linux root and user password in easy way

Introduction

Hey! This article is for beginners but people who are not beginners can also read it. 
If you have read my other post on How to install Linux then you know that while making a video tutorial on How to install Linux OS i forgot my user password. 
So, i had to make a another video tutorial to show you that how to handle this kind of situation. 

You can watch the video Tutorial below: 



Lets begin!!

How to hack Linux Password   

Trust me hacking, cracking and resetting passwords is not an easy job. It takes a lot of research and hard work to get the job done.

and you must me thinking that if i have created a full video tutorial on how to tackle this situation then why i am wasting my time in creating a blog post. Well, in video tutorial we cannot explain everything.

Now, i will come back to the main topic on How to crack Root and user password of linux. Well, its not an easy job as i said and not too complicated also. I will tell you the easy steps in a moment but first we will clear the concept of passwords in Linux.

Concept of Passwords

Everyone one knows that a string of characters that allows access to a computer, interface, or system is called a password but the question arises that what makes password so special and important and secured!!.

Well, the answer to this is, We may remember password as plain text but computer system always stores it in either encrypted form or hashed form. For those who do not understand what is difference between encryption and Hashing. Let me tell you in a simple language that encryption is an reversible process and hashing is an irreversible process. which makes hashing more secure and which is the reason that most of the OS and websites stores passwords in hashed format. 

You must be thinking that how these passwords are hashed. well its an off topic for now but i will explain it in another post. For know just keep it in mind that When we create a new password we put it as a plain text in the password box and upon submitting it goes from series of processes before it gets saved into the database or system or configuration files and these processes changes the plain text into hashed or encrypted forms. 

In Linux 

We have two passwords:
  • Root Password
  • User Password
Root password is used to carryout all the administrative tasks in Linux where User Password is to to do basic tasks in Linux. 

Both of these passwords are stored in 2 different configuration files:
  • Shadow File
  • Password.conf File
Both of these files are stored in /etc folder. one thing i want to tell you that Shadow file is the only file in the linux which has no read , write and execute permissions even to root also. 

Now, lets discuss the Steps:

Step 1: At the booting menu select the OS with navigation keys and press "e"



Step2: Now you will see 3 lines:
  • Hard Disk's Header
  • Kernel Image Link
  • Initrd Image Link 



Use navigation keys to select the kernel image line and press "e" again.

Step 3: Now give space after quiet and type 1 and press enter 



Step 4: Now you will come back to the previous screen now press "b" to boot the system




Step 5: Now your system will boot in Single user mode and after you get the shell type this command without inverted commas 

passwd -d username



in the place of username enter the name of user like in my case i will write cybergears because i have to change the password of cybergears or you can also type root if you want to change the root password.

 remember "-d" is a switch to delete the password. this command will delete the password of that particular user and you can set password later 


Step 6: After run the above command press init 0 command to shutdown the system and then boot it again and login to your system.

Step 7: Now we will set the Password for that user. Open Terminal or console and go to super user mode and ether the following command:

passwd username



and hit enter here, replace username with the user whose password you are going to set. in our case its cybergears. Now set the password and you are done.

For other ways of getting passwords have a look at this article


 

Comments