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,這樣就可以登錄進去了

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