get users list

  • Thread starter Thread starter Feijó
  • Start date Start date
F

Feijó

How can I get all users, with name, fone, email, etc. from AD ?

I use Delphi 6, there is any component or lib? I had build a program to do
that from Novel with LDAP, ie:

conex := ldap_open(ldapSrv, port);
Ldap_set_Option(conex, LDAP_OPT_DEREF, @i);
I1 := ldap_search_s(conex, 'OU=*,O=SERVER', LDAP_SCOPE_SUBTREE, '(CN=*)',
nil, 0, @pSearch);


But I cant figure out how to make it work with Win2k server

are my parameters incorrect?


TIA!!!
Feijó
 
Not sure how you would do it with Delphi [ as I am a complete novice in most
languages.....well, a lot of people would say a complete novice in most
things ;-) ].

One thing that you can do - and it is built into WIN2000 and WIN2003 - is to
use ldifde.

You would need to use the -l switch ( that is actually the lowercase letter
'L', not the number '1' ) and then indicate which specific attributes that
you wanted included in the output file.

You might also want to look at ADSI......

Does this help you?

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 
How can I get all users, with name, fone, email, etc. from AD ?
I use Delphi 6, there is any component or lib? I had build a program to do
that from Novel with LDAP, ie:

You can definitely import the "ActiveDs.tlb" from c:\windows\system32
to get access to all the ADSI COM objects from Delphi.
http://adsi.mvps.org/adsi/Delphi/index.html
http://adsi.mvps.org/adsi/Delphi/ADSISearch.zip

If you need to search, you will need to have a look at the
IDirectorySearch interface - or my Delphi component that wraps up that
rather ugly interface to make it easier to use! :-) Download my
component from:

I described how to search Active Directory from Delphi using ADSI in
an article in "THe Delphi Magazine" - get a back issue of issue 62
(Oct 2000):
http://www.thedelphimagazine.com/conts/conts62.php
http://www.thedelphimagazine.com/backissu.php

Or better yet, get yourself the whole "The Delphi Magazine" CD-ROM
collection with all issues as PDF's - highly recommended!
http://www.thedelphimagazine.com/coll.php

HTH
Marc
________________________________________________________________
Marc Scheuner ** mscheuner -at- mvps.org ** http://adsi.mvps.org
Microsoft MVP for Directory Services Programming
http://www.dirteam.com/blogs/mscheuner/default.aspx
http://groups.yahoo.com/group/ADSIANDDirectoryServices/
 
Thanks a lot for you reply, Marc !

I will read all links you mentioned

I still need to figure out what are the values to use from my server: name,
domain, etc.
probably my LDAP code isnt working becouse I dont know what to put on it

Will give a shot with ADSI



regards
 
Thanks Cary, I will look at that ADSI and LDIFDE

any doubts I post here again :)


regards

Feijó


Cary Shultz said:
Not sure how you would do it with Delphi [ as I am a complete novice in most
languages.....well, a lot of people would say a complete novice in most
things ;-) ].

One thing that you can do - and it is built into WIN2000 and WIN2003 - is to
use ldifde.

You would need to use the -l switch ( that is actually the lowercase letter
'L', not the number '1' ) and then indicate which specific attributes that
you wanted included in the output file.

You might also want to look at ADSI......

Does this help you?

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com



Feijó said:
How can I get all users, with name, fone, email, etc. from AD ?

I use Delphi 6, there is any component or lib? I had build a program to
do
that from Novel with LDAP, ie:

conex := ldap_open(ldapSrv, port);
Ldap_set_Option(conex, LDAP_OPT_DEREF, @i);
I1 := ldap_search_s(conex, 'OU=*,O=SERVER', LDAP_SCOPE_SUBTREE, '(CN=*)',
nil, 0, @pSearch);


But I cant figure out how to make it work with Win2k server

are my parameters incorrect?


TIA!!!
Feijó
 
I still need to figure out what are the values to use from my server: name,
domain, etc.
probably my LDAP code isnt working becouse I dont know what to put on it

Bind to LDAP://RootDSE and have a look at the "defaultNamingContext"
attribute - it should tell you what your default "dc=mycompany,dc=com"
part is.

Also, you might want to have a look at Beavertail, my C# ADSI Browser,
which visually shows you your AD hierarchy and all the attributes with
their values, for all AD objects - go grab it for free from:

http://adsi.mvps.org/adsi/CSharp/beavertail.html

Enjoy
Marc
________________________________________________________________
Marc Scheuner ** mscheuner -at- mvps.org ** http://adsi.mvps.org
Microsoft MVP for Directory Services Programming
http://www.dirteam.com/blogs/mscheuner/default.aspx
http://groups.yahoo.com/group/ADSIANDDirectoryServices/
 
Marc,

Great app that of yours! Will be very helpfull
Now I can connect to my Ldap, but cant retrieve info yet :)
But will soon, its time to study your code


Thanks again
Feijó
 
Hi Feijo

I'm trying to access Novel NDS with LDAP and Delphi 7. Can you give me
any advice where to start? Is there any component to get?

Regards Heinrich
 
Back
Top