事情还要从我的记不住密码的脑子说起…
我今天晚上登录CentOS的时候,发现一直给我报密码错误,我把我从出生到现在我能记起来的密码全部尝试了一遍,但是….你懂的,蜜汁操作,怎么都不对。。
所以我去google、百度了几个博文,寻求解决方式,和我想的差不多,果然是可以的…
首先我们得在linux还没有开机的时候点e,其实这里是edit,平常就有这个,只是我们没用过就略过去了。
在此之后找到LANG=zh_CN这一串,最后加上我这样的,ctrl+X继续启动。

之后依次输入以下代码
1) mount -o remount, rw /
2) passwd EotStxTaB(linux安装的用户)
3)输入密码(两次)
4)touch /.autorelabel
5)exec /sbin/init(重启系统)



