免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5005 | 回复: 5
打印 上一主题 下一主题

通过第三方的目录服务(ldap)验证,登录linux主机,求解决办法!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-11-09 15:32 |只看该作者 |倒序浏览
本帖最后由 yangsk2 于 2010-11-09 17:43 编辑

公司有一个邮件服务器(IBM domino),提供ldap目录服务,

准备搭建一个下载服务器,用户使用ldap目录服务验证,可以登录linux主机,在该主机上连接外网下载自己需要的软件。

不知道需要在linux主机上做何种设置才能实现,或者是domino上做设置。

刚才又查了一下,据说在linux上配置openldap -client 但是不知道怎么配置
谁能给个文档啊

论坛徽章:
0
2 [报告]
发表于 2010-11-09 16:58 |只看该作者
等待中

论坛徽章:
0
3 [报告]
发表于 2010-11-09 17:29 |只看该作者
等待分享一下!

论坛徽章:
0
4 [报告]
发表于 2010-11-10 11:58 |只看该作者
Sorry,不是很清楚你的需求,只说说我对你的理解吧。
LDAP其实就是一个提供校验的控制中心,你如果是想登录服务器使用LDAP验证,这个没问题,因为我们所有服务器都是使用LDAP中心控制用户帐号密码。这个设置是在pam的验证设置的,可是使用密码+证书加密的方式。这样每次用户登录就都会去LDAP中心做校验,通过才让登录服务器。
参考:http://www.ibm.com/developerworks/cn/linux/l-openldap/

另一种是你想登录WEB应用,权限使用LDAP验证,这个需要上面的连接就解决不了了,你可以考虑自己写login页面,页面可以使用ldapsearch 的命令在服务器上做校验,通过则让登录。

下面的ldapsearch 的详细说明。

usage: ldapsearch [options] [filter [attributes...]]
where:
  filter        RFC-2254 compliant LDAP search filter
  attributes    whitespace-separated list of attribute descriptions
    which may include:
      1.1   no attributes
      *     all user attributes
      +     all operational attributes
Search options:
  -a deref   one of never (default), always, search, or find
  -A         retrieve attribute names only (no values)
  -b basedn  base dn for search
  -E [!]<ext>[=<extparam>] search extensions (! indicates criticality)
             [!]domainScope              (domain scope)
             [!]mv=<filter>              (matched values filter)
             [!]pr=<size>[/prompt|noprompt]   (paged results/prompt)
             [!]subentries[=true|false]  (subentries)
             [!]sync=ro[/<cookie>]            (LDAP Sync refreshOnly)
                     rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist)
  -F prefix  URL prefix for files (default: file:///tmp/)
  -l limit   time limit (in seconds, or "none" or "max") for search
  -L         print responses in LDIFv1 format
  -LL        print responses in LDIF format without comments
  -LLL       print responses in LDIF format without comments
             and version
  -s scope   one of base, one, sub or children (search scope)
  -S attr    sort the results by attribute `attr'
  -t         write binary values to files in temporary directory
  -tt        write all values to files in temporary directory
  -T path    write files to directory specified by path (default: /tmp)
  -u         include User Friendly entry names in the output
  -z limit   size limit (in entries, or "none" or "max") for search
Common options:
  -c         continuous operation mode (do not stop on errors)
  -C         chase referrals (anonymously)
  -d level   set LDAP debugging level to `level'
  -D binddn  bind DN
  -e [!]<ext>[=<extparam>] general extensions (! indicates criticality)
             [!]assert=<filter>     (an RFC 2254 Filter)
             [!]authzid=<authzid>   ("dn:<dn>" or "u:<user>")
             [!]manageDSAit
             [!]noop
             ppolicy
             [!]postread[=<attrs>]  (a comma-separated attribute list)
             [!]preread[=<attrs>]   (a comma-separated attribute list)
             abandon, cancel (SIGINT sends abandon/cancel; not really controls)
  -f file    read operations from `file'
  -h host    LDAP server
  -H URI     LDAP Uniform Resource Identifier(s)
  -I         use SASL Interactive mode
  -k         use Kerberos authentication
  -K         like -k, but do only step 1 of the Kerberos bind
  -M         enable Manage DSA IT control (-MM to make critical)
  -n         show what would be done but don't actually do it
  -O props   SASL security properties
  -o <opt>[=<optparam>] general options
             nettimeout=<timeout> (in seconds, or "none" or "max")
  -p port    port on LDAP server
  -P version protocol version (default: 3)
  -Q         use SASL Quiet mode
  -R realm   SASL realm
  -U authcid SASL authentication identity
  -v         run in verbose mode (diagnostics to standard output)
  -V         print version info (-VV only)
  -w passwd  bind password (for simple authentication)
  -W         prompt for bind password
  -x         Simple authentication
  -X authzid SASL authorization identity ("dn:<dn>" or "u:<user>")
  -y file    Read password from file
  -Y mech    SASL mechanism
  -Z         Start TLS request (-ZZ to require successful response)

论坛徽章:
0
5 [报告]
发表于 2010-11-11 10:16 |只看该作者
本帖最后由 yangsk2 于 2010-11-11 10:19 编辑

回复 4# yingweixu

ldap 服务器已经有了(就是IBM domino提供的LDAP服务),我现在想做的就是使用这个ldap服务来验证另一台linux机器的用户登录
比如domino里面有用户zhangshan , 有一台linux机器,   但是 这个linux机器里面没有zhangshan这个账号,我想让这个linux机器使用domino的ldap来验证

当zhangshan登录的时候,这个linux主机会调用domino里的账户信息,让张山登录这个linux主机

现在我是不知道怎么让这个linux主机和ldap服务器连通。我使用domino里面的账户登录的时候提示验证失败。

论坛徽章:
0
6 [报告]
发表于 2010-11-11 10:24 |只看该作者
看似这个问题也没那么麻烦了。

执行setup,在里面配置一下通过LDAP查找用户信息和通pam_ldap来认证应该就行。

如果还出错,好好看看/var/log/secure。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP