加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 服务器 > 搭建环境 > Unix > 正文

IBM AIX和Microsoft Active Directory与Kerberos和LDAP的集成

发布时间:2016-10-16 20:19:49 所属栏目:Unix 来源:站长网
导读:副标题#e# 为什么是 Kerberos 和 LDAP LDAP 对于存储和检索 AIX 用户的用户属性非常有效,但使用 LDAP 进行身份验证仍然需要用户提供一个 AIX 密码和一个 AD 密码。Kerberos 支持 AIX 使用本地 AD 协议,参照用户的 Microsoft Windows 密码进行用户身份验证

验证 keytab:

/usr/krb5/bin/klist –ke

这应该在域控制器上提供 ktpass 生成的密钥。

示例输出

Keytab name: FILE:/etc/krb5/krb5.keytab

KVNO Principal

---- ---------

2 host/aix1.test.local@TEST.LOCAL (ArcFour with HMAC/md5)

测试 keytab:

/usr/krb5/bin/kinit -k

注意:这里应该没有输出。如果您得到错误消息,很可能存在 DNS 问题。我花了大量时间在这一步进行 KVNO、加密类型和 DNS 错误的故障排除。我使用 tcpdump (tcpdump -i en0 -s 65535 -w krb5ldap_ts.pcap host 10.10.0.5) 命令捕获传入或传出域控制器的程序包,并加载 Wireshark 中的 pcap 文件,查看发生了什么。

使用 klist 实用程序查看已发布的票据:

/usr/krb5/bin/klist

这应该显示主机主体的票据。

示例输出

Ticket cache: FILE:/var/krb5/security/creds/krb5cc_0

Default principal: host/aix1.test.local@TEST.LOCAL

Valid starting Expires Service principal

01/25/13 13:59:10 01/25/13 23:59:03 krbtgt/TEST.LOCAL@TEST.LOCAL

Renew until 01/26/13 13:59:10

配置 AIX 以使用 KRB5LDAP

编辑 /etc/methods.cfg:

关键点:

确保 KRB5 选项包括:authonly,is_kadmind_compat=no,tgt_verify=no,allow_expired_pwd=yes

   确保 KRB5LDAP stanza 包括 auth 和 db 选项。

使用示例 methods.cfg 文件(在本文结尾处提供)作为一个示例。

修改 /etc/security/user:

chsec -f /etc/security/user -s default -a SYSTEM="KRB5LDAP OR compat"

示例输出

# lssec -f /etc/security/user -s default -a SYSTEM

default SYSTEM="compat"

# chsec -f /etc/security/user -s default -a SYSTEM="KRB5LDAP or compat"

# lssec -f /etc/security/user -s default -a SYSTEM

default SYSTEM="KRB5LDAP or compat"

将 Kerberos 添加到授权的身份认证实体并验证:

chauthent -k5 –std

#Verify

lsauthent

这应该返回 Kerberos 5 和 Standard AIX。

示例输出

Kerberos 5

Standard Aix

测试 KRB5LDAP

通过查询您使用 AIX 属性(本例中是 aixtest)在 AD 中创建的用户来测试 KRB5LDAP:

lsuser –R KRB5LDAP aixtest

这应该从 AIX 上下文中返回有关 AD 用户的细节。

示例输出

aixtest id=50001 pgrp=AIXLDAP groups=AIXLDAP home=/home/aixtest shell=/usr/bin/ksh

gecos=AIX Test User login=true su=true rlogin=true daemon=true admin=false sugroups=ALL

admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=22

registry=KRB5LDAP SYSTEM=KRB5LDAP or compat logintimes= loginretries=0

pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0

minother=0 mindiff=0 maxrepeats=8 minlen=0

histexpire=0 histsize=0 pwdchecks= dictionlist= fsize=-1 cpu=-1

data=262144 stack=65536 core=2097151 rss=65536 nofiles=-1 roles=

查看本栏目更多精彩内容:http://www.bianceng.cn/OS/unix/

试着将用户转换成 AD 定义的用户:

su – aixtest

(编辑:PHP编程网 - 黄冈站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

推荐文章
    热点阅读