Solved

Search for Users with Published Certificates in AD

Posted on 2007-03-19
4
2,578 Views
Last Modified: 2012-08-14
Does anyone know how to find all users in AD with published certificates?  My org needs to know so that we can start disabling those account that do not contain a certificate.   The published certiticates cannot be seen unless you check 'advanced options' in AD users and computers.  But when I want to do a search under AD i cannot use that field to search.  Any clues?  Thanks guys!
0
Comment
Question by:ashaheed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 30

Expert Comment

by:LauraEHunterMVP
ID: 18759257
You can use an LDAP query tool such as dsquery (built into the 2003 operating system), LDP (in the Support Tools) or adfind (free download from www.joeware.net) to query on the userCertificate attribute.  To use adfind, as an example, you would use the following syntax to return all users in your domain that have one or more certificates configured: (careful, this syntax will wrap - type it all on one line.)

adfind -default -f "(&(objectclass=user)(objectcategory=person)(userCer
tificate=*))"

To find users who -don't- have certificates, simply put a ! in front of userCertificate, like so:

adfind -default -f "(&(objectclass=user)(objectcategory=person)(!userCer
tificate=*))"

HTH

Laura E. Hunter - Microsoft MVP: Windows Server - Networking
0
 

Author Comment

by:ashaheed
ID: 18761812
This is great.  I downloaded the tool from the site you mentioned and it does what I want except I need to export this somehow in a report.  The screen just keeps scrolling and scrolling with tons of info.  Is there anyway to export it into a managable form (.xls, .csv, .txt)?

Thanks again!
0
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 500 total points
ID: 18762391
You can use the "-dsq" option to return only the distinguished name (DN) of the objects rather than a full list of all object attributes, and pipe the whole thing to a text file using "> nocerts.txt".  So the full command string might look like: (again, all on one line)

adfind -default -f "(&(objectclass=user)(objectcategory=person)(!userCer
tificate=*))" -dsq > nocerts.txt

Adfind is an extremely flexible and powerful tool for querying AD - if you do a lot of work with AD it's worth playing around with it and reading through the different help screens (adfind -?, adfind -??, adfind -????, adfind -sc?, adfind meta?) to see all the different things you can do with it.  Adfind can only be used to query AD, not to modify it, so it's quite harmless to just play around with it - there's virtually ZERO chance of inadvertently breaking anything within your directory just by reading it.
0
 

Expert Comment

by:W_Anschutz
ID: 25135590
If you want to query directly in ADUC, create a custom query entering the following under Advanced > Enter LDAP query or you can rename the attached txt file to .XML, import under Saved Queries and reset the OU:

(&(&(&(&(objectCategory=person)(objectClass=user)(!userCertificate=*)))))
NoCerts.txt
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
A hard and fast method for reducing Active Directory Administrators members.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question