How to Reset or Change the Root Password in Linux

Changing Your Root Password in Ubuntu



Step 1: Open a Terminal Window

Right-click the desktop, then left-click Open in terminal.

Alternately, you can click Menu > Applications > Accessories > Terminal




Step 2: Change Your Root Password

In the terminal window, type the following:


sudo passwd root


The system will prompt you to enter your password – this is the same password you use to log in to the system.

Next, the system will prompt you to enter a new password. Do so, and then re-enter it exactly the same when the system prompts you to retype the password. This double-entry confirms that you have typed the password correctly.




Resetting a Root Password in Ubuntu


In some situations, you may need to access an account for which you’ve lost or forgotten a password.


Step 1: Boot to Recovery Mode


Restart your system. Once you see the splash screen for the computer manufacturer, hold down the shift key. The system should come up with a black and white GRUB, or boot menu, with different Linux kernel versions displayed.

Select the second one from the top – the highest revision, followed by (recovery mode). Press Enter.



Step 2: Drop Out to Root Shell


The system should display a menu with different boot options. Use the arrow keys to navigate to the option labeled root and press Enter.

The system should respond by giving you a command-line interface with a prompt.



Step 3: Remount the File System with Write-Permissions


Right now, your system only has read-only access to your system. That means it can look at the data, but cannot make any changes. But we need write-access to change the password, so we’ll need to remount the drive with the appropriate permissions.

At the prompt, type:


mount –o rw,remount /


Press Enter. This should allow you to make changes to the data on the hard drive.



Step 4: Change the Password


At the prompt, type:


passwd username


Substitute the name of the user for username, then press Enter. The system asks you to type a new UNIX password and then to retype it.

Once you’ve entered and confirmed the new password, reboot the system by entering the following:


shutdown –r


Hit  Share:

12 Comments

ZAP
09/Jan/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
01/Apr/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
02/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
05/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
10/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
15/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
18/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
18/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
18/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
18/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
23/Jul/2024

Zaproxy dolore alias impedit expedita quisquam.

ZAP
15/Nov/2024

Zaproxy dolore alias impedit expedita quisquam.

Leave a Reply

your credientials will not be public

Tags

  • Apple
  • Macbook
  • SSD
  • Linux

Categories

  • Hints 192