从 RPM 重新安装文件?

从 RPM 重新安装文件?

因此我需要从 authconfig RPM 安装原始的 /etc/pam.d/system-auth-ac 文件。我尝试通过“重新安装”authconfig 包/rpm 来实现这一点,如下所示:

mv /etc/pam.d/system-auth-ac ~/
rpm -e --justdb --nodeps authconfig
yum install authconfig

但是文件并未重新安装。要让 yum 重新安装文件,需要做什么?

更新:

对 yum 安装进行了 strace,发现文件“/etc/pam.d/system-auth-ac”已被 rpm 安装打开但未写入。进一步查看后发现该文件是在执行 authconfig 二进制文件后生成的。

所以现在问题不再与 RPM 有关。我需要弄清楚 RH5.6 的默认 authconfig 命令是什么样的,这样我才能获得正常的 system-auth-ac 文件。

答案1

尝试这个:

yum -y install yum-utils
yumdownloader authconfig
rpm -Uvh --replacepkgs authconfig*

编辑:

尝试这个:

system-config-authentication

相关内容