美文网首页
centos6、centos7更改root地址及修复

centos6、centos7更改root地址及修复

作者: ALuckyLive | 来源:发表于2017-05-27 20:18 被阅读0次

更改roor管理员UID为非零时,centos6、centos7无法正常启动。重启centos6、centos7时系统运行不一样。

一、Centos6

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

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

SecureCRT开启centos6新端口。

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

VMwere切换centos6新的端口。

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

编辑界面。

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

输入命令;init=/bin/bash。

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

输入命令;mount -o remount,rw /。

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

输入命令;nano /etc/passwd。 更改root地址UID为0.

8、重新启动centos6.

重新启动完。

二、Centos7

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

更改root用户(UID)地址为2000,进行保存。

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

重新启动centos7.

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

输入命令;init=/bin/bash。

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

输入命令;mount -o remount,rw /。

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

输入命令;nano /etc/passwd。

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

更改root地址UID为0,进行保存。

7、重新启动centos7。

重新启动完成。

Centos6重新启动成功,修复完成。

相关文章

网友评论

      本文标题:centos6、centos7更改root地址及修复

      本文链接:https://www.haomeiwen.com/subject/jtzqfxtx.html