How To Change The Root Password

Table of contents:

How To Change The Root Password
How To Change The Root Password

Video: How To Change The Root Password

Video: How To Change The Root Password
Video: how to change or set the root password in any linux distribution(ubuntu, linux mint etc) 2024, May
Anonim

Root is the name of the administrator in the Ubuntu operating system, in other words "Superuser". To change system parameters, install and configure programs, you must enter the password for this user.

How to change the root password
How to change the root password

Necessary

a computer with Linux OS

Instructions

Step 1

You can recover the current root password only by brute force, the so-called Bruteforce method. If there is physical access to the computer, replace the current root password with a new one. Boot the system in single-user mode, this will force the kernel to start only the bash interpreter.

Step 2

If your computer uses the Grub boot loader, select the required kernel from the list, press the E key to edit the boot parameters. Select the Kernel line, press E. again. Add a boot specification, type init = / bin / bash. Then click Enter, return to the previous menu and press the B key to boot.

Step 3

Prepare to change the password if your system uses the LILO boot loader. Exit graphical mode with the Tab key, enter the kernel label with init = / bin / bash.

Step 4

Start mounting the root partition by using the "Read / Write" mode. To do this, enter the command # mount / -o remount, rw. Next, enter the Root password change command - # passwd root /. After that, a message will appear stating that the Root password change was successful. Mount the root again in ro mode. To do this, use the command # mount -o remount, ro. Next, reboot the system with the # reboot command.

Step 5

Boot system from Livecd to change Root password. Run terminal under Root. First, set the name of the partition where the system is installed. This is done with the # fdisk –l command. Make this partition writable from a bootable disk. Create a folder for the mount point, then mount the partition itself.

Step 6

Next, declare the filesystem under / dev / hda1 as root. The Bash interpreter will be launched. Now change the system password to the new one. Next, exit the interpreter, unmount the partition. Now the lost password has been successfully changed to a new one.

Recommended: