本文介绍了如何在ldap中按dn搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从ldap获取有关用户的信息.这包括directReports,格式为完整的"CN = cnBlah,OU = ouBlah,DC = dcBlah".我正在尝试进行另一次查找以找到有关该报告人的信息.

I'm pulling information about a user from ldap. This includes directReports, which is in the full "CN=cnBlah, OU=ouBlah, DC=dcBlah" form. I'm trying to do another lookup to find info about the reportee.

到目前为止,我真正能够找到所说用户的唯一方法是打破CN =并将字符串的其余部分设置为基数.

So far the only way I've been able to actually find said user is to break out the CN= and set the remainder of the string as the base.

这是正确的做法吗?还是有一种方法可以在给定完整dn的情况下搜索条目?

Is this the proper way of doing it? Or is there a way to search for an entry given the full dn?

推荐答案

在搜索中使用DN作为基础对象,并将搜索范围设置为base.

Use the DN as the base object in the search and set the scope of the search to base.

这篇关于如何在ldap中按dn搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 19:40