In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly analyzes the relevant knowledge points of how to reset the root password of Linux system, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "how to reset the root password of the Linux system".
In our daily operation and maintenance work, we will more or less encounter possible situations such as the system administrator's password has been forgotten, or the last staff member left and failed to do a good job in the handover, or the form for managing passwords has been mistakenly updated, and so on. Today, the editor will share with you the most basic necessary skills of Linux system engineers how to force the change of the administrator's password (applicable to RedHat, Centos6 or 7 systems) before personal testing, to ensure success!
1. Administrator root password modification under Redhat6 (same as Centos6)
1. If it is a production line server, we need to apply for a shutdown window to restart the server. The moment the server turns on the power and enters the system bios power-on self-test, we must quickly press the up and down keys of the keyboard to enter the following interface.
2. At this time, we press the "E" key of the keyboard to enter the system boot boot editing interface. We use the keyboard up and down keys to select the kernel kernel line, as shown in the following figure:
3. After selecting the kernel kernel line, we press the "E" key again according to the prompt below. After entering the editing interface, enter "1" or "single" in the space behind quiet to tell the system that I want to enter single-user mode, as shown in the following figure:
4. After entering "1", we press the enter key of the keyboard, and then press the "b" key of the keyboard to enter single-user mode, as shown in the following figure:
5. After entering the single-user mode, we can execute the command to change the root password. You can enter the command directly: passwd or enter passwd root to change the password, as shown below:
6. The last step is to restart the system by reboot. Is it very simple? next, let's see how to change the root password under Centos7.
2. Modify root password under Centos7 (same as Redhat7)
1. As above, restart the system first, press and hold the up and down keys of the keyboard to enter the system configuration boot interface, as shown in the following figure:
2. Select the first line by default, and then press the "e" key of the keyboard to enter the editing interface, as shown in the following figure:
3. In the editing interface, we find the line linux16, find "ro", and replace "ro" with "rw init=/sysroot/bin/sh", as shown in the following figure:
4. After modification, we press the keyboard "Ctrl + x" key to enter single-user mode, as shown in the following figure:
5. Then we enter the command "chroot / sysroot" to access the system, and then enter passwd root to change the password. After the modification, we enter the command "reboot" to restart the system and use the new password to log in to the system! As shown in the following figure:
This is the end of the introduction on "how to reset the root password of the Linux system". More related content can be searched for previous articles, hoping to help you answer questions and questions, please support the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.