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

Centos7 reset password

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Turn on the power and press'e' on the interface to enter the system to enter the editing page:

two。 Add: init=/bin/sh at the end of the field at the beginning of linux16

3. Press the "ctrl+X" key combination to enter single user mode

Enter the following page to indicate that you have successfully entered single-user mode. After entering single-user mode, the file system is read-only. Enter the command 'mount-o remount,rw /' to change to read-write mode.

4. Use the command 'passwd' to reset the password:

5. Use 'touch / .autorelabel' to create selinux security tags

6. Use 'exec / sbin/init' to reboot the process and restart

Verify that the login is successful:

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