您如何查看Unix LDAP数据库中可用的根? [英] How can you view what roots are available in a Unix LDAP database?

查看:80
本文介绍了您如何查看Unix LDAP数据库中可用的根?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查看服务器上可用于搜索/修改的所有根名称.我尝试过在线查找-但是我仍然找不到基本级别. ldapsearch -b"o = blah.com" -p 1111"objectclass = *"返回该blah.com中的所有内容,因为过滤器是所有对象类. 是否有一个类似的函数可以找到所有o = *?我需要能够在每个目录中进行搜索并在某些时候进行修改...而又不知道其中有什么,我有点受其他开发人员的摆布....

I'm trying to view all root names on a server that are available for searching thru/modifying. I've tried looking online-but I'm still unable to find the base levels. ldapsearch -b "o=blah.com" -p 1111 "objectclass=*" returns everything in that blah.com due to the filter being all object classes. Is there a similar function to be able to find all o=*? I need to able to search thru each of those directories and modify things at some point...and without knowing what's in there, i'm sort of at the mercy of the other developers....

推荐答案

如果问题是"如何获取有效的顶级基础dn(s)?",则您有多种选择:

If the question is "How to get valid top-level base dn(s) ?", you have multiple options :

  • 域组件(dc)通常与FQDN匹配,使用这些dc来构建顶级基础dn是有意义的(例如'host.example.com'将给出'dc=example,dc=com'),但不能保证会导致有效基本域名.
  • 搜索rootDSE信息:ldapsearch -H ldap://host.example.com -x -s base -b '' +
    然后检索 namingContexts defaultNamingContext 属性,它们中的任何一个都可以用作搜索库dn.
  • 使用诸如Apache Directory Studio之类的LDAP资源管理器显示目录树,选择与objectClass: dcObject(以及可选地o=something)匹配的顶部对象:通过将其dn用作dn,可以将任何对应的条目用作搜索基础对象.基本目录
  • Domain components (dc) usually match the FQDN, it makes sense to use these dc's to build up a top level base dn (e.g. 'host.example.com' would give 'dc=example,dc=com'), but it is not guaranteed it results in a valid base dn.
  • Search for rootDSE information :ldapsearch -H ldap://host.example.com -x -s base -b '' +
    Then retrieve the namingContexts or defaultNamingContext attribute(s), any one of them can be used as a search base dn.
  • Use an LDAP explorer like Apache Directory Studio to display the directory tree, select a top object matching objectClass: dcObject (and optionnally o=something) : any corresponding entry can be used as a search base object by using its dn as the base dn.

这篇关于您如何查看Unix LDAP数据库中可用的根?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆