СHRISTMAS
WHEEL OF FORTUNE

Tap the button and win a guaranteed prize right now!

By registering, you are signing up to receiving e-mails.
JT
December 8 2023
Updated December 8 2023

How to reset password on Linux?

Linux Security

The primary reason for changing a user's password is to prevent unauthorized access by malicious actors. Cybercriminals often attempt to crack a login key through brute-force attacks or through data breaches of other systems, which could give them an opportunity to guess your password correctly. Therefore frequent password rotations can help protect your personal information or that of your organization's. But what if you forget credentials for your Linux server? And alternative authentification protocols like TACACS+ or RADIUS haven't configured. In that instruction we consider way for change them.

Highlight! The writeup represent information about security mechanism only in the educational purposes and doesn't call for anything!

Way for crack

That approach commonly used due to features or vulnerability of various way to start kernel via GRUB bootloader, but before we need to explain how to authentification system work!

In the machine stored credentials in the hash-form with salt, that randomly sequences of value that give as more complicated and strong password between various attack. Where user try to connect, Linux compare hash of the entering password with stored credentials, if they match then user can get access in another way denied entrance, that control kernel module. Also in the modern system there is PAM that module integrate various way to authenticate and they have own features. We will stop on the basic model of checking access.

For bypass system requirements we need to disable or replace kernel module, but how to do this? Let's come back to the text above with bootloader GRUB. In the moment of startup we can choose type of boot, like in the screen below:

grub
Screenshot №1 — Grub

Press E button to edit startup configuration, exactly in that place we indicate way to start. Scroll down and add that row to the string which start with linux word:

init=/bin/bash

If disk encrypted then add:

plymouth.enable = 0

Also if in that string is ro change them to rw:

Edit
Screenshot №2 — Edit

Alright! Press Ctrl + X or F10 for save changes and wait for load system, after all check you will see terminal window with bash. For change password use command below:

passwd root
First way
Screenshot №3 — First way

Reboot your system and changes that we made in the config will reset, but password that you set will stay!

 

In conclusion, the imperative need to change a user's password arises from the constant threat of unauthorized access by malicious actors in the digital landscape. Frequent password rotations serve as a proactive measure to mitigate the risk of cybercriminals exploiting vulnerabilities, whether through brute-force attacks or compromised data from external breaches. This practice is crucial for safeguarding personal information and organizational security.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
33145 North Miami, FL 2520 Coral Way apt 2-135
+1 302 425-97-76
700 300
ITGLOBAL.COM CORP
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.