CentOS 7忘记root密码解决办法

wylc123 1年前 ⋅ 765 阅读

1.重启开机按esc

2.选择第二个菜单,按e

3.编辑修改两处:ro改为rw,在LANG=en_US.UFT-8后面添加init=/bin/sh

4.按Ctrl+X重启,并修改密码

passwd root

4、如果出现下面Authentication token manipulation error错误的话,

先输入 

mount -o remount,rw  / 

再进行修改操作即可修改成功!

5.由于selinux开启着的需要执行以下命令更新系统信息,否则重启之后密码未生效
touch /.autorelabel
6.重启系统
exec /sbin/init

更多内容请访问:IT源点

相关文章推荐

全部评论: 0

    我有话说: