大网数据广告活动
服务器运维问答

Recovering CentOS from bad pam configuration

· 52CE 我爱测

I have a bad PAM configuration got configured on a server. Attempting to ssh in only gives the error "Authentication Failed" though, verbose mode in SSH shows the authentication being successful. I am also unable to attain a user…

问题原文

原帖链接 · Jesse P Lesperance · CC BY-SA 3.0

I have a bad PAM configuration got configured on a server. Attempting to ssh in only gives the error "Authentication Failed" though, verbose mode in SSH shows the authentication being successful.

I am also unable to attain a user/password prompt from an ILO console shell.

Things I am thinking of trying though unsure of are:

  1. Can CentOS be installed over itself and preserve data

  2. Can I boot into single user mode and fix the configuration

  3. Boot from live cd, mount the partitions and fix the configuration

  4. Something else

Any guidance other than wipe the whole system would be appreciated.

已采纳解答

原帖链接 · ThoriumBR · CC BY-SA 3.0

The easiest way is to boot a LiveCD and fix the configuration.

After booting a live session, mount /etc from the dead server on /mnt, backup the existing /etc/pam.d folder and copy /etc/pam.d contents to /mnt/etc/pam.d.

After that, reboot the server, load it from the disk, and it should be fine.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。