LDAP Queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to do a query within AD using an LDAP query.

What I want to do is find all user accounts where the last part of the home
directory is not the same as the Pre-Windows 2000 Logon name.

How do i query a field?

I am looking for something like this...
(objectCategory=user)(!homeDirectory=*(samAccountName))

How do I tell it that it is a field and not a string?? If, indeed this is
possible

Thanks

Andrew Perry
 
Andy said:
I am trying to do a query within AD using an LDAP query.

What I want to do is find all user accounts where the last
part of the home directory is not the same as the
Pre-Windows 2000 Logon name.

How do i query a field?

I am looking for something like this...
(objectCategory=user)(!homeDirectory=*(samAccountName))

How do I tell it that it is a field and not a string??
If, indeed this is possible
I guess you can't extract just the user, homeDirectory
and samAccountName to a file and then process that file?

Sometimes it is easier to do something in two steps.

Cheers,

Cliff
 
LDAP queries can't be written that way, you have to send in a fixed query.

The solution to this is to dump the samaccountname and homedirectory values for
all users and run a script across the values.

jeo
 
Back
Top