How to reset your Linux password if lost

How to reset your Linux password if lost

1. The startup menu is to move the cursor to the first line - press e

2. Find UTF-8, add a space rd.break, and press ctrl+x

3. Enter the following command

mount -o remount,rw /sysroot 
chroot /sysroot
echo "wz123." | passwd --stdin root
touch /.autorelable
exit
exit(reboot) 

Summarize

The above is the tutorial I introduced to you on how to reset your Linux password if it is lost. I hope it will be helpful to you!

You may also be interested in:
  • How to modify and reset the root password in Linux (super simple)
  • Prevent users from changing/resetting passwords in Linux
  • How to reset MySQL root password in Linux (CentOS)
  • Reset mysql root password in linux system
  • How to reset the root password of Linux VPS using SSH
  • Reset MySQL database root password (linux/windows)

<<:  JavaScript+html to implement front-end page sliding verification (2)

>>:  Detailed explanation of how to view MySQL memory usage

Recommend

Do you know the common MySQL design errors?

Thanks to the development of the Internet, we can...

MySQL encryption and decryption examples

MySQL encryption and decryption examples Data enc...

Docker FAQ

Docker only maps ports to IPv6 but not to IPv4 St...

Detailed explanation of triangle drawing and clever application examples in CSS

lead Some common triangles on web pages can be dr...

Implementation of docker-compose deployment project based on MySQL8

1. First, create the corresponding folder accordi...

How to view the status of remote server files in Linux

As shown below: The test command determines wheth...

Nodejs uses readline to prompt for content input example code

Table of contents Preface 1. bat executes js 2. T...

MySQL Constraints Super Detailed Explanation

Table of contents MySQL Constraint Operations 1. ...

A comprehensive summary of frequently used statements in MySQL (must read)

The knowledge points summarized below are all fre...

MySQL 5.7.23 installation and configuration graphic tutorial

This article records the detailed installation pr...

Vue uses ECharts to implement line charts and pie charts

When developing a backend management project, it ...

CSS realizes the realization of background image screen adaptation

When making a homepage such as a login page, you ...

How to bypass unknown field names in MySQL

Preface This article introduces the fifth questio...