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

How to use native JS to implement touch sliding monitoring events

Preface I wrote a small demo today. There is a pa...

A practical record of an accident caused by MySQL startup

Table of contents background How to determine whe...

Detailed explanation of Nginx http resource request limit (three methods)

Prerequisite: nginx needs to have the ngx_http_li...

Detailed explanation of vuex persistence in practical application of vue

Table of contents vuex persistence Summarize vuex...

Use Firebug tool to debug the page on iPad

How to debug a page on iPad? When using iOS 5, you...

A detailed discussion of MySQL deadlock and logs

Recently, several data anomalies have occurred in...

What are the advantages of using B+ tree index in MySQL?

Before understanding this problem, let's firs...

js to achieve a simple carousel effect

This article shares the specific code of js to ac...

Detailed explanation of how two Node.js processes communicate

Table of contents Preface Communication between t...

Example of how nginx implements dynamic and static separation

Table of contents Deploy nginx on server1 Deploy ...

CentOS7 installation GUI interface and remote connection implementation

Use the browser (webdriver)-based selenium techno...