Can we able to get user details by using only CN=username,DC=domain,DC=org in OPENLDAP search?
-
Hi,
Here i'm trying to get Active Directory's user details by OPENLDAP.
My exact situation is i'm having admin credentials for Active directory. I can able to list OU or User groups.
Then I can list or read a particular user details by using following method,
LDAPSearchResults* entries = lc->search("CN=username,OU=groupname,DC=domain,DC=org");
But i want to read that user's details only by CN=username,DC=domain,DC=org.
is there any ways to do it. If any please guide me about how to do it.
Thanks in advance.
-
Hi,
Here i'm trying to get Active Directory's user details by OPENLDAP.
My exact situation is i'm having admin credentials for Active directory. I can able to list OU or User groups.
Then I can list or read a particular user details by using following method,
LDAPSearchResults* entries = lc->search("CN=username,OU=groupname,DC=domain,DC=org");
But i want to read that user's details only by CN=username,DC=domain,DC=org.
is there any ways to do it. If any please guide me about how to do it.
Thanks in advance.
@Surendar-Dharani
Does this LDAP query have anything to do with Qt? Assuming not, you might be better asking in some LDAP forum, or perhaps www.stackoverflow.com?EDIT Sorry, I missed your OPENLDAP, maybe it is indeed from Qt. Then if you do not get an answer here, since this is more a question about LDAP searches than anything Qt, you might want to ask in a more LDAP-py forum....
-
@Surendar-Dharani
Does this LDAP query have anything to do with Qt? Assuming not, you might be better asking in some LDAP forum, or perhaps www.stackoverflow.com?EDIT Sorry, I missed your OPENLDAP, maybe it is indeed from Qt. Then if you do not get an answer here, since this is more a question about LDAP searches than anything Qt, you might want to ask in a more LDAP-py forum....
@JonB said in Can we able to get user details by using only CN=username,DC=domain,DC=org in OPENLDAP search?:
OPENLDAP, maybe it is indeed from Qt.
if it's this OpenLDAP it looks it has nothing to do with Qt...
-
@JonB said in Can we able to get user details by using only CN=username,DC=domain,DC=org in OPENLDAP search?:
OPENLDAP, maybe it is indeed from Qt.
if it's this OpenLDAP it looks it has nothing to do with Qt...
@Pablo-J-Rogina
I just mean t there are a few posts about accessing OpenLDAP from Qt, e,g,
https://forum.qt.io/topic/69077/how-can-i-use-openldap-from-a-qt-application-under-windows
https://forum.qt.io/topic/100891/integrate-openldap-libraries-with-qt-windows-android-and-mac-application
But the question itself looks more like an LDAP question. -
Got solution. Thanks all.
LDAPSearchResults* entries = lc->search("DC=domain,DC=org",LDAPConnection::SEARCH_SUB,"cn=username");
By this i can able to get a single user.
-
Got solution. Thanks all.
LDAPSearchResults* entries = lc->search("DC=domain,DC=org",LDAPConnection::SEARCH_SUB,"cn=username");
By this i can able to get a single user.
@Surendar-Dharani said in Can we able to get user details by using only CN=username,DC=domain,DC=org in OPENLDAP search?:
Got solution
Great! Thank you for sharing it. Please don't forget to mark your post as solved.