Cách đặt lại mật khẩu root trong RHEL/CentOS và Fedora

maikhanh975

New member
## Cách đặt lại mật khẩu gốc trong RHEL/CentOS và Fedora

### 1. ** Điều kiện tiên quyết **

Để đặt lại mật khẩu gốc, bạn sẽ cần:

* Một hệ thống Rhel/Centos hoặc Fedora đang chạy
* Một tài khoản người dùng có đặc quyền sudo
* Các lệnh sau:
* `passwd`
* `Chroot`
* `init`

### 2. ** Quy trình **

1. ** Đăng nhập vào hệ thống với tư cách là người dùng có đặc quyền sudo. **

2. ** Chạy lệnh sau để thay đổi mật khẩu gốc: **

`` `
gốc passwd
`` `

3. ** Nhập mật khẩu gốc mới hai lần. **

4. ** Khởi động lại hệ thống. **

5. ** Đăng nhập vào hệ thống dưới dạng gốc bằng cách sử dụng mật khẩu mới. **

### 3. ** Khắc phục sự cố **

Nếu bạn không thể đặt lại mật khẩu gốc, bạn có thể cần khởi động hệ thống thành chế độ người dùng đơn.Để làm điều này, hãy làm theo các bước sau:

1. ** TẮT hệ thống. **

2. ** Bật hệ thống và ngay lập tức nhấn phím ** Escape **. **

3. ** Chọn ** Chế độ người dùng đơn ** từ menu khởi động. **

4. ** Đăng nhập vào hệ thống là Root. **

5. ** Chạy lệnh sau để thay đổi mật khẩu gốc: **

`` `
gốc passwd
`` `

6. ** Nhập mật khẩu gốc mới hai lần. **

7. ** Khởi động lại hệ thống. **

### 4. ** Tài nguyên bổ sung **

* [Cách đặt lại mật khẩu gốc trên RHEL/CentOS] (https://www.digitalocean.com/community/tutorials/how-to-reset-the-root-password-on-centos-7)
* [Cách đặt lại mật khẩu gốc trên Fedora] (https://www.tecmint.com/reset-root-password-in-fedora/)

### 5. ** hashtags **

* #linux
* #Rhel
* #centos
* #Fedora
* #ROOT-password
=======================================
## How to reset Root password in Rhel/Centos and Fedora

### 1. **Prerequisites**

To reset the root password, you will need:

* A running RHEL/CentOS or Fedora system
* A user account with sudo privileges
* The following commands:
* `passwd`
* `chroot`
* `init`

### 2. **Procedure**

1. **Log in to the system as a user with sudo privileges.**

2. **Run the following command to change the root password:**

```
passwd root
```

3. **Enter the new root password twice.**

4. **Reboot the system.**

5. **Log in to the system as root using the new password.**

### 3. **Troubleshooting**

If you are unable to reset the root password, you may need to boot the system into single-user mode. To do this, follow these steps:

1. **Power off the system.**

2. **Turn on the system and immediately press the **Escape** key.**

3. **Select **Single User Mode** from the boot menu.**

4. **Log in to the system as root.**

5. **Run the following command to change the root password:**

```
passwd root
```

6. **Enter the new root password twice.**

7. **Reboot the system.**

### 4. **Additional Resources**

* [How to Reset the Root Password on RHEL/CentOS](https://www.digitalocean.com/community/tutorials/how-to-reset-the-root-password-on-centos-7)
* [How to Reset the Root Password on Fedora](https://www.tecmint.com/reset-root-password-in-fedora/)

### 5. **Hashtags**

* #linux
* #Rhel
* #centos
* #Fedora
* #ROOT-password
 
Join ToolsKiemTrieuDoGroup
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock