//
you're reading...
IT-Center, Operating System

LDAP : listing all LDAP user’s

1. Open run/cmd and type ldp.exe <enter>
For Windows XP, please download http://www.microsoft.com/en-us/download/details.aspx?id=18546

2. Bind Connection via Connection Menu > Bind
3. Query ldap with View menu > Tree View.
bottom query lije UO=People,DC=example_domain,DC=com

___________________________________________________________________
Other Reference Using LDAP

Determining the Name of the Attribute to Be Used in the Search

//

  1. Insert the Windows 2000 CD-ROM and open the Windows 2000 Support Tools kit. From \support\tools, run Setup.exe. This installs the Support Tools kit, which in turn installs LDP.
  2. On the Connection menu, click Connect.
  3. Type in the server name of a domain controller in the enterprise, verify that the port setting is set to 389, click to clear the Connectionless check box, and then click OK. Once the connection is complete, server-specific data is displayed in the right pane.
  4. On the Connection menu, click Bind. Type the user name, password, and domain name (in DNS format) in the appropriate boxes (you may need to select the Domain check box), and then click OK. If the binding is successful, you should receive a message similar to “Authenticated as dn:’YourUserID'” in the right pane.
  5. On the Browse menu, click Search.
  6. The Base DN is the starting point in the Active Directory hierarchy at which your search will begin. In the Base DNbox, type
    CN=Schema,CN=Configuration,dc=mydomain,dc=com

    replacing mydomain and com with the appropriate domain name. NOTE: the domain name for the Base DN when searching the Schema will always be for the root domain of the forest.

  7. In the Filterbox, type
    (adminDescription=*yourtexthere*)

    replacing yourtexthere with a keyword that might describe the attribute you are looking for.

    Or, type

    (adminDisplayName=*yourtexthere*)

    replacing yourtexthere with a part of the name of the attribute as it is displayed in the administrative tools (e.g. entering “office” would return the attribute “physicalDeliveryOfficeName”.)

    Or, type

    (ldapDisplayName=*yourtexthere*)

    replacing yourtexthere with a part of the name of the attribute as used in LDAP queries, if you know it.

  8. In the Scope frame, click Subtree.
  9. Click Options. In the Attributes box, type ldapDisplayName.
  10. Accept all other defaults, click OK and then click Run. After the query completes, the Distinguished Name (DN) of the object(s) found and the value of the ldapDisplayName attribute (now used in turn to search for data) of each are displayed in the right pane.

    For example, doing a search on any attributes that have the text “office” in the “adminDisplayName” would yield the following output:

    ***Searching… ldap_search_s(ld, “cn=schema,cn=configuration,dc=mydomain,dc=com”, 2, “(adminDisplayName=*office*)”, attrList, 0, &msg)
    Result <0>: (null)
    Matched DNs:
    Getting 3 entries:
    >> Dn: CN=Phone-Office-Other,CN=Schema,CN=Configuration,DC=mydomain,DC=com

    1> lDAPDisplayName: otherTelephone;

    >> Dn: CN=Physical-Delivery-Office-Name,CN=Schema,CN=Configuration,DC=mydomain,DC=com

    1> lDAPDisplayName: physicalDeliveryOfficeName;

    >> Dn: CN=Post-Office-Box,CN=Schema,CN=Configuration,DC=mydomain,DC=com

    1> lDAPDisplayName: postOfficeBox;

 

Searching the Active Directory for Specific Information

// Once the attribute name has been determined, either specified in documentation or by using the procedure outlined above in the section “Determining the Name of the Attribute to be Used in the Search”, you can use the following steps to find objects in the Active Directory that meet the criteria you are looking for.

The name of the attribute (ldapDisplayName) is used in queries to determine which objects should be returned based on meeting criteria supplied by the user.

  1. Run Ldp.exe from the Support\Reskit\Netmgmt\Dstool folder on the retail Windows 2000 CD-ROM.
  2. On the Connection menu, click Connect.
  3. Type in the server name of a domain controller in the enterprise, verify that the port setting is set to 389, click to clear the Connectionless check box, and then click OK. Once the connection is complete, server-specific data is displayed in the right pane.
  4. On the Connection menu, click Bind. Type the user name, password, and domain name (in DNS format) in the appropriate boxes (you may need to select the Domain check box), and then click OK. If the binding is successful, you should receive a message similar to “Authenticated as dn:’YourUserID'” in the right pane.
  5. On the Browse menu, click Search.
  6. The Base DN is the starting point in the Active Directory hierarchy at which your search will begin. In the Base DNbox, type
    dc=mydomain,dc=com

    replacing mydomain and com with the appropriate domain name to search for objects such as users, computers, contacts, groups, file volumes, and printers.

    Or, type

    CN=Configuration,dc=mydomain,dc=com

    replacing mydomain and com with the appropriate domain name to search the Configuration partition of the Active Directory which includes such objects such as Sites, Subnets, Site Links, Site Link Bridges, and Forest structure.

    Or, type

    CN=Schema,CN=Configuration,dc=mydomain,dc=com

    replacing mydomain and com with the appropriate domain name to search the Schema partition of the Active Directory which includes the classes and attributes defined for the Forest of which the domain controller is a member.

  7. In the Filterbox, type
    (AttributeName=*yourtexthere*)

    replacing AttributeName with the name of the attribute (as defined by ldapDisplayName) and replacing yourtexthere with the search criteria such as in the following examples:

    (physicalDeliveryOfficeName=*Seattle*)

    Or,

    (badPwdCount=1)
  8. In the Scope frame, click Subtree.
  9. Click Options. In the Attributes box, type the name of each of the attributes that should be displayed for each object found that meets the specified criteria separated by semicolons.

    For example, by requesting that all objects (users intended in this example) whose “physicalDeliveryOfficename” contains “Seattle”, display the User Profile Path and Logon Script path of each of the users (or other object types) found. The following would be entered in the Attributes box:

    profilePath;scriptPath
  10. Accept all other defaults, click OK and then click Run. After the query completes, the Distinguished Name (DN) of the object(s) found and the value of the each of the attributes specified are displayed in the right pane.

    An example of the output would be as follows:

    ***Searching…
    ldap_search_s(ld, “dc=mydomain,dc=com”, 2, “(physicalDeliveryOfficeName=*Seattle*)”, attrList, 0, &msg)
    Result <0>: (null)
    Matched DNs:
    Getting 2 entries:
    >> Dn: CN=user1,CN=Users,DC=mydomain,DC=com

    1> profilePath: \\w2k-dc-01\profiles\user1;
    1> scriptPath: users.vbs;

    >> Dn: CN=user2,CN=Users,DC=mydomain,DC=com

    1> profilePath: \\w2k-dc-01\profiles\user2;
    1> scriptPath: users.vbs;

About berbagisolusi

Berbagi merupakan sebuah bentuk simbol keikhlasan untuk membantu dan menolong, sedangkan solusi adalah cara menyelesaikan masalah. Setiap manusia pasti mengalami masalah, tetapi kita tidak perlu mengalami masalah yang sama jika orang lain pernah mengalami dan kita tahu hal tersebut.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

July 2012
M T W T F S S
« Jun   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archives

Web Statistic

Blog Stats

  • 149,551 hits
%d bloggers like this: