linux登录显示 Error in service module错误

背景:操作系统:suse 11 4bit同事搭建环境A将原先现网的/etc/sysctl.conf拷贝打上,执行sysctl –p生效后,将A环境的/etc/security/limits.conf重名为.bak文件后,将现网/etc/security/limits.conf通过scpA的时候报错

[root@station90 ~]# scp /etc/security/limits.conf [email protected]:/etc/security/

Password:

lost connection

rsync也同样报错

[root@station90 ~]# rsync /etc/security/limits.conf [email protected]:/etc/security/

Password:

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: unexplained error (code 254) at io.c(463) [sender=2.6.8]

[root@station90 ~]#

Sftp也同样报错,A环境没有安装vsftpd,即使安装了也没有用,默认root是不允许ftp

[root@station90 ~]# sftp [email protected]

Connecting to 192.168.15.99...

Password:

Couldn't read packet: Connection reset by peer

同事遂重启了A系统,最大的败笔就在此了,进入运行级别3后,如下1所示

1root登入系统,密码输入正确,报:Error in service module
\

2、由于同事做的操作记录了日志,当日志拿过来的时候,明显的原因就是mv /etc/security/limits.conf /etc/security/limitsconf.bak后,重启系统导致,但是现在无法进入系统

3、考虑单用户模式是否可以解决该问题,重启系统,在出现登入选项时,按ESC,在Boot Options的最后面加上single,回车,即可进入单用户模式,如下所示:
\

4、输入root密码,将文件重命名回来,init 3进入运行级别3即可正常登入了
\

5、大周末的出这种事情,周一到公司定要让那同事请吃饭去,哈哈,现在可以正常登入啦

6、如果没有limits.conf的备份文件,可以在目录下touch一个limits.conf,这样就可以登录进去了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章