Skip to content

Windows Server 2008 – How to use LDP Query Tool – The Visual Guide


Step 1 – Start the ldp.exe tool

Start > Run > ldp.exe



Step 2 – Connect & Configure

Connection > Connect


Enter Domain Controller name

Port 389

Clear Connectionless check box if it’s selected > OK



Step 3 – LDP Results without a logon

LDP will display lots of information, without a password.

Notice that the ldap service is “” – we’ll use this later.

ldp results

Step 4 – Connect and then BIND

The second option is that we 1. Connect, 2. Bind (use an Administrator Id and password).

bindBind logon Box

Bind as currently logged on user… or not…

bind box

Bind with credentials

Enter password

Notice the Domain is in DNS syntax.

bind teaching

Ldp will report the bind as “authenticated”

bind authenticatedSo what do we do with this?

Step 5 – The Filter Box

Browse > Search



Step6 – Search for users

Base Dn: DC=teaching, DC=ac, DC=uk

Filter:  (objectclass=user)

Set the Scope to Subtree

ldp search for user


Sarumans user account

saurman user

Property flag descriptions

  • SCRIPT – The logon script will be run.
  • ACCOUNTDISABLE – The user account is disabled.
  • HOMEDIR_REQUIRED – The home folder is required.
  • PASSWD_NOTREQD – No password is required.

Step 7 – To search for user OR office

ldp uses a strange OR syntax – the or term comes at the start. (| (search 1) (search s2))

Filter: (|  (objectClass=user) (description=*office)  )

ldp or searchor


Step 8 – To search for user AND office

Filter: (& (objectClass=user) (description=*office*) )

results saruman

The only weird thing is working out the operators, which come before the search criteria.


Step 9 – The hunt for Gandalf.

Lets go find Gandalf….

(| (cn=Gandalf*) (cn=Peter) )



How to search for 3 common names…



Phew…. quite a tool.

Leave a Comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: