言午栩

关注

How To Reset Root Password On CentOS 7

言午栩

关注

阅读 132

2022-02-16

  1. 重启CentOS,在GRUB Boot 菜单,按e编辑启动菜单:

How To Reset Root Password On CentOS 7_单用户模式

2.将光标移动到 Linux16 所在行,将 ro 更改为 “rw init=/sysroot/bin/sh”:

How To Reset Root Password On CentOS 7_单用户模式_02

改为:

How To Reset Root Password On CentOS 7_单用户模式_03

按下Ctr+x 启动到单用户模式(single user mode)下:

How To Reset Root Password On CentOS 7_单用户模式_04

3.在单用户模式下运行如下命令:

chroot /sysroot

passwd root

touch /.autorelabel

exit

reboot

How To Reset Root Password On CentOS 7_centos_05


相关推荐

zhyuzh3d

Centos /etc/fstab/出错,提示 Give root password maintenance

zhyuzh3d 120 0 0

蛇发女妖

How to Install Veeam Agent on CentOS 7 Offline

蛇发女妖 271 0 0

幺幺零

How To Install and Use Docker Compose on CentOS 7

幺幺零 97 0 0

陌岛

Centos7 Linux重置root密码

陌岛 11 0 0

承蒙不弃

centos7 root密码找回

承蒙不弃 129 0 0

大雁f

How to Setup Local HTTP Yum Repository on CentOS 7

大雁f 98 0 0

西红柿上校

How to access other computer using different name/password

西红柿上校 106 0 0

狐沐说

Enter password: ***** ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:

狐沐说 125 0 0

钵仔糕的波波仔

CentOS7配置SFTP(root用户登录版)

钵仔糕的波波仔 84 0 0

前端王祖蓝

丢失root密码,且give root password for maintenance的解决方法

前端王祖蓝 43 0 0

精彩评论(0)

0 0 举报