你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 10.04安装配置LDAP服务

[日期:2013-05-31] 来源:Linux社区  作者:pc620 [字体:大 中 小]

2. LDAP客户端安装与配置

2.1 使用apt-get安装相关服务
#sudo apt-get install libnss-ldapd libpam-ldapd
安装过程中根据安装向导输入ldap服务器IP和相应base域名信息,最后,针对nss services勾选group和passwd两项即可。
注:Ubuntu系统中LDAP客户端的配置文件为/etc/nslcd.conf和/etc/nsswitch.conf,以上配置信息都可以在该配置文件中随时修改!修改后要重启服务:service nslcd restart
# /etc/nslcd.conf
# nslcd configuration file. See nslcd.conf(5)
# for details.

# The user and group nslcd should run as.
uid nslcd
gid nslcd

# The location at which the LDAP server(s) should be reachable.
uri ldap://127.0.0.1/

# The search base that will be used for all queries.
base dc=edu,dc=example,dc=org

# The LDAP protocol version to use.
#ldap_version 3

# The DN to bind with for normal lookups.
#binddn cn=annonymous,dc=example,dc=net
#bindpw secret

# SSL options
#ssl off
#tls_reqcert never

# The search scope.
#scope sub
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat ldap
group: compat ldap
shadow: compat

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
 


2.2 安装配置完成后,使用以下命令验证访问LDAP服务器是否成功
#getent passwd
#getent group
 
若不能正确显示LDAP服务器上的相关用户和组,则检查以下原因:
①LDAP服务器是否开启
②LDAP服务器防火墙是否关闭
③客户端配置的LDAP服务器IP是否正确,可否ping通
④客户端配置的base域名是否正确
⑤端口不对
⑥版本不对

-----------------------------------------------
【相关说明】
① libnss-ldap 被用于名字解析, libpam-ldap 用 pm 通过LDAP来认证用户。

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

linux
相关资讯       LDAP服务 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款