Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if I forgot my root password for Ubuntu?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "Ubuntu's root password forgot how to do". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Ubuntu forgot password, forgot root password? Although it is a small probability event, it is still possible to happen. So, what do we do when we forget our Ubuntu root password? Let's take a look at the solution given by Principal Ubuntu.

Ubuntu's root is disabled by default, and you are not required to set your root password during installation, which is different from the Red Hat system series here. To use root under Ubuntu, we can use the terminal to set the password for root

Sudo passwd root

If only ordinary users forget their passwords, they can change them with root. If root forgets, enter single-user mode, which is different from the Red Hat system series.

The specific methods are as follows:

Enter single-user mode:

# 1. When you boot into grub, use the up and down keys to move to the recovery mode of the second line, and press e (please note that it is not enter)

# 2

Change ro single to rw single init=/bin/bash, then press ctrl+x to enter single-user mode and do whatever you want. Going in is the command line, so you have to know how to use the command line We can change the password of ordinary users, or we can change the password of root. Hint, when finished, press the "ctrl+alt+delete" combination key to restart (I have tried to shut down the computer with the command, not even restart, only this).

I have tried all these, but also successful, you try it! I've seen some methods on the Internet, and I've tried them, but they won't work! Some are using the Red Hat system series of methods, some are some step is wrong!

Modify the password of an ordinary user. The command is in the following format:

This is the end of the passwd user name "Ubuntu's root password forgot how to do". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report