Change the root password in Ubuntu Linux with an unknown root Password

Source: Internet
Author: User

Change the root password in Ubuntu Linux with an unknown root Password

A simple and practical way to change the root password in the history of Ubuntu/Linux without knowing the root password

Generally, there are two steps:

1. Enter the read/write root user mode. 2. Change the root password.

Press F12 (or Shift) To Go To The GRUB page.

1. Select Advanced options for Ubuntu

2. Two modes are displayed,

1. Ubuntu, Linux 3.5.0-17-generic

2, Ubuntu, Linux 3.5.0-17-generic (recovery mode) (or recovery mode)

In recovery mode, press e to go to the script editing interface in Ubuntu recovery mode,

Find the following statement: It starts with linux, followed... Ro recovery nomodeset

Change ro recovery nomodeset to rw single init =/bin/bash

Note: If this parameter is not modified, the file cannot be modified after entering the root directory.

The preceding modification is to change to readable and writable single-user mode, and press Ctrl + x to enter single-user mode. At this time, the user is the root user.

The above steps are used to enter the read/write root user mode. The following steps are to change the root password.

After entering the command line, enter the new root password and execute passwd root in the command line to enter the new password twice.

At this time, the original root password will always go with the wind, and only God knows that it has existed and troubled us, just like the girl we secretly loved when we were young. finally, restart the system. BTW: the above method is applicable when you do not know the root password and any user password, for example, get a PC, do not know the boot password. if a user's logon password is known, you can use sudo passwd root to enter the current user's password to change the root password.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.