用于openssh RPM CentOS 6.5的Pam配置

时间:2015-02-19 14:36:21

标签: linux centos rpm openssh pam

我们的产品使用CentOS 6.5,我们希望使用自定义的openssh RPM来部署它们。我已从http://athena.caslab.queensu.ca/pub/OpenBSD/OpenSSH/portable下载了源代码并构建了RPM,但安装后PAM配置文件错误。

当我从CentOS 6.5存储库安装默认的openssh-5.3p1 RPM时,配置如下所示:

> cat /etc/pam.d/sshd
#%PAM-1.0
auth       required    pam_sepermit.so
auth       include      password-auth
account    required     pam_nologin.so
account    include      password-auth
password   include      password-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the
user context
session    required     pam_selinux.so open env_params
session    optional     pam_keyinit.so force revoke
session    include      password-auth

但是,当我从源重建这个确切的RPM并安装它时,我得到以下内容:

> cat /etc/pam.d/sshd
#%PAM-1.0
auth       required     pam_stack.so service=system-auth
account    required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth

我想知道是否有任何构建日志可以显示如何从CentOS 6.5的源代码构建openssh RPM。也许我缺少某种类型的配置可以确保我获得相同的PAM配置。

谢谢!

1 个答案:

答案 0 :(得分:0)

您可以从大多数镜像(绝对是http://vault.centos.org)获取所有CentOS发布软件的源RPM(SRPM)。

源rpm包含整个源,补丁等以及构建官方RPM的spec文件,其中包含您要查找的信息。