Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search.vbs: how can i query attributes?

Status
Not open for further replies.

martincab

Programmer
May 12, 2003
39
0
0
US
Thanks for any help with this:

I'm trying to query my openldap database to get some attributes. With ldapsearch.exe the query looks like this:

ldapsearch -LLL -b "dc=mydomain,dc=com" -h 192.168.20.xxx "(cn=mcabrera)" uidNumber gidNumber

And the output looks like this:

dn: uid=mcabrera,ou=Usuarios,dc=activos,dc=com
uidNumber: 1330
gidNumber: 2001

But when I try to do the same with search.vbs (or any suggested visual or java script), i'm unable to get the uidNumber and gidNumber attributes:

cscript search.vbs LDAP://192.168.20.240/DC=activos,DC=com /C:ObjectClass=person /C:sn=mcabrera /C:eek:u=Usuarios /S:SubTree

Produces this output:

<LDAP://192.168.20.240/DC=activos,DC=com>;(ou=Usuarios);ADsPath;SubTree
Finished the query.
Found 1 objects.
ADsPath 1 = LDAP://192.168.20.240/ou=Usuarios,dc=activos,dc=com

When i try with this:

cscript search.vbs LDAP://192.168.20.240/DC=activos,DC=com /C:ObjectClass=person /C:sn=mcabrera /C:eek:u=Usuarios /P:uidNumber /S:SubTree

i get this error:

Error 0x80004005 ocurred during the query

Thanks for any clue.


Martin Cabrera
Oracle dba
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top