加入收藏 | 设为首页 | 会员中心 | 我要投稿 应用网_丽江站长网 (http://www.0888zz.com/)- 科技、建站、数据工具、云上网络、机器学习!
当前位置: 首页 > 服务器 > 搭建环境 > Unix > 正文

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

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

通过编辑来添加额外的 LDAP 服务器,并检查基本可识别名称 (DN) 和缓存大小。我建议至少提供两个 LDAP 服务器,在地理上,它们位于具有 AIX 主机的局域网中,以避免延迟并提供故障转移。

编辑 :/etc/security/ldap/ldap.cfg 并确保以下设置正确:

userattrmappath:/etc/security/ldap/sfur2user.map

groupattrmappath:/etc/security/ldap/sfur2group.map

serverschematype:sfur2

Windows Server 2008 R2 Active Directory 包含 R2 UNIX 属性,无需安装 Microsoft Windows Services for UNIX 程序包。sfur2 映射最适合此场景。

注意:在 6.1TL8 上,我必须更改从 sfu30 到 sfur2 的映射;在 TL6 上不需要这样做。

查看文本结尾 示例配置文件 中的示例 ldap.cfg。

在某些情况下,用户的 AIX 用户名(AD UID)可能与 AD 中的 sAMAccountName 不匹配。如果是这样的话,请将下列代码行添加到 /etc/security/ldap/sfur2user.map,以支持用户更改其密码 uring Kerberos。

auth_name  SEC_CHAR  sAMAccountName  s  na  yes

启动 LDAP 客户端服务:

restart-secldapclntd

示例输出

The secldapclntd daemon terminated successfully.

Starting the secldapclntd daemon.The secldapclntd daemon started successfully.

验证 LDAP 客户端服务正在运行:

ls-secldapclntd

示例输出

ldapservers=pdc1.test.local 
ldapport=389active connections=1
ldapversion=3
userbasedn=OU=AIX,DC=test,DC=local
groupbasedn=OU=AIX,DC=test,DC=local
idbasedn=
usercachesize=1000
usercacheused=1
groupcachesize=100
groupcacheused=2
usercachetimeout=300
groupcachetimeout=300
heartbeatT=300
numberofthread=10
connectionsperserver=10
alwaysmaster=no
authtype=UNIX_AUTH
searchmode=ALL
defaultentrylocation=LDAP
ldaptimeout=60
serverschematype=SFUR2
userobjectclass=user,person,organizationalperson
groupobjectclass=group

测试 LDAP 分辨率:

lsuser -R LDAP ALL

输出应返回您使用 UNIX 属性创建的用户。

示例输出

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=LDAP 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 time_last_login=1359144648 tty_last_login=/dev/pts/1 
host_last_login=pc42.test.local 
unsuccessful_login_count=0 roles=

安装和配置 Kerberos

验证 Kerberos 客户端尚未安装:

lslpp -l | grep krb

如果未安装 Kerberos,则不会产生输出。

从 IBM AIX Web Download Pack Programs 网站下载 AIX Network Authentication Service (NAS) 程序包。

注意:我对 AIX 6.1 TL8 和 AIX 7.1 使用了 NAS 版本 1.5.0.4,对 AIX 6.1 TL6  使用了版本 1.5.0.2 。

提取和安装 NAS 程序包:

#list contents to verify a good download:
         
tar tf NAS_1.5.0.x_aix_image.tar
         
#untar
         
tar xf NAS_1.5.0.x_aix_image.tar
         
#rename folder tosomething more descriptive
         
mv images AIX_NAS

安装下列程序包:

krb5.client.rte

krb5.client.samples

krb5.doc.en_US.html

krb5.doc.en_US.pdf

krb5.lic

krb5.client.rte

注意:在 smit 中选择 client、doc 和 lic 程序包将向您提供要安装的程序包。

(编辑:应用网_丽江站长网)

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

推荐文章
    热点阅读