Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Search for Users with Published Certificates in AD

Posted on 2007-03-19
4
Medium Priority
?
2,781 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 2000 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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

610 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