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

Initialise Kerberos ticket on ssh login using PAM

· 52CE 我爱测

Right, so I am struggling a bit with PAM in Centos7. I have no idea how to configure it manually and make the changes permanent so that I get a kerberos ticket after a successful ssh login. The primary authentication method as yo…

问题原文

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

Right, so I am struggling a bit with PAM in Centos7.

I have no idea how to configure it manually and make the changes permanent so that I get a kerberos ticket after a successful ssh login.

The primary authentication method as you can see is winbind and I want it to stay like this.

So far I have in my /etc/pam.d/system-auth which is auto-generated using authconfig:

auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success
auth        sufficient    pam_winbind.so use_first_pass
auth        required      pam_deny.so

In earlier releases I would add:

auth optional       pam_krb5.so       try_first_pass

Any idea how to do this in Centos7? I don't want to use kerberos for authentication as it will probably mess up with everything on a password change.

已采纳解答

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

I ended up using authconfig afterall, which means that I had to prepare a full kerberized environment.

authconfig --enablewinbindkrb5 --update

Note for anyone else who is planning to use this, this command updates the PAM stack, I believe it invalidates the config in /etc/security/pam_winbind.conf and also modifies /etc/samba/smb.conf.

In order to use it properly the machine must have a valid krb5.conf, belong to the domain and have a valid system keytab.

Then on every successful ssh login a krbtgt key will be created which allows ticket generation and usage for authentication. This means that ssh won't ask for a password to login on the next server if it has a proper kerberized setup.

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

资料来源与适用范围

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

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

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