centos 忘记root密码_redhat重置密码
实验环境:centos6.5/7.6;redhat6.10/7.6
首先介绍7系列redhat7.6/centos7.6忘记root密码后的重置方法
命令如下:
mount -o remount,rw /sysrootchroot /sysrootpasswd #设置新的root密码touch /.autorelabel #如果启用selinux,则该命令必需,否则不必需exitexit
再介绍redhat6系列重置密码root密码方法,centos6和redhat6方法一样
总得来说,centos和redhat系列重置root密码的方法在6系列差不多,在7则体现出较小差距,难道要开始分家么?