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

About browser compatibility issues encountered and solutions (recommended)

Preface: Last Sunday, a senior asked me to help m...

The difference between KEY, PRIMARY KEY, UNIQUE KEY, and INDEX in MySQL

The problem raised in the title can be broken dow...

Vue calculated property implementation transcript

This article shares the Vue calculation property ...

How to modify the group to which a user belongs in Linux

Modify the group to which a user belongs in Linux...

Implementation code for using CSS text-emphasis to emphasize text

1. Introduction In the past, if you wanted to emp...

Vuex implements simple shopping cart function

This article example shares the specific code of ...

Full process record of Nginx reverse proxy configuration

1. Preparation Install Tomcat on Linux system, us...

Brief analysis of centos 7 mysql-8.0.19-1.el7.x86_64.rpm-bundle.tar

Baidu Cloud Disk: Link: https://pan.baidu.com/s/1...

Vue login function implementation

Table of contents Written in front Login Overview...

Example of adding multi-language function to Vue background management

Table of contents 1. First, configure the main.js...

Detailed tutorial for installing influxdb in docker (performance test)

1. Prerequisites 1. The project has been deployed...

MySQL 5.7.10 Installation Documentation Tutorial

1. Install dependency packages yum -y install gcc...