root的初始密码1、要先确定是否为RHEL 7系统。如果是,然后再进行下面的操作。
[root@linuxprobe ~]# cat /etc/redhat­release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
2、重启Linux系统主机并出现引导界面时,按下键盘上的e键进入内核编辑界面
3、在linux16参数这行的最后面追加rd.break参数,然后按下Ctrl + X组合键来运行修改过的内核程序
4、大约30秒过后,进入到系统的紧急求援模式
5、依次输入以下命令,等待系统重启操作完毕,然后就可以使用新密码linuxprobe来登录Linux系统了。命令行执行效果如图1­49所示。
[root@linuxprobe ~]#mount ­o remount,rw /sysroot
[root@linuxprobe ~]#chroot /sysroot
[root@linuxprobe ~]#passwd
New password:输入新密码(输入的密码是不显示的)
Retype new password:再次输入新密码
[root@linuxprobe ~]#touch /.autorelabel
[root@linuxprobe ~]#exit
[root@linuxprobe ~]#reboot
6、重启之后,就可以用新密码登陆系统了。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。