更改roor管理员UID为非零时,centos6、centos7无法正常启动。重启centos6、centos7时系统运行不一样。
一、Centos6
1、centos6用户root地址更改为2000,ctrl+x/y进行保存。

2、更改root用户(UID)地址为2000,进行保存。在SecureCRT上从新开启centos6端口,无法连接centos6。

3、在VMwere上切换centos6新端口时,用户无法登入。

4、用户无法登入与链接,系统处于故障状态。重启VMwere上的centos6→快速点击A键,进入编辑界面。

5、输入命令init=/bin/bash回车。

6、输入命令mount -o remount,rw / 回车。

7、输入命令nano /etc/passwd,更改root地址UID为0,ctrl+x/y进行保存。


8、重新启动centos6.

二、Centos7
1、centos7用户root地址更改为2000,ctrl+x/y进行保存。

2、root用户无法登,系统处于故障状态。重启VMwere上的centos7→快速点击E键,进入编辑界面。

3、输入命令init=/bin/bash、按ctrl+x键进行下一步。

4、输入命令mount -o remount,rw / 回车。

5、输入命令nano /etc/passwd。

6、更改root地址UID为0,ctrl+x/y进行保存。

7、重新启动centos7。

Centos6重新启动成功,修复完成。
网友评论