{"id":649,"date":"2010-10-04T02:54:38","date_gmt":"2010-10-04T07:54:38","guid":{"rendered":"http:\/\/yourLinuxGuy.com\/?p=649"},"modified":"2010-10-23T22:37:39","modified_gmt":"2010-10-24T03:37:39","slug":"how-to-do-ldaps-queries-from-linux-to-active-directory-pt-2","status":"publish","type":"post","link":"https:\/\/yourLinuxGuy.com\/?p=649","title":{"rendered":"How to do LDAPS queries from Linux to Active Directory pt. 2"},"content":{"rendered":"<p>Sub-Title:\u00a0 &#8220;An <em>easier<\/em> way to export a MS AD CA root cert&#8230;&#8221;<\/p>\n<p><em>After the popularity of <a title=\"http:\/\/yourlinuxguy.com\/?p=635\" href=\"http:\/\/yourlinuxguy.com\/?p=635\" target=\"_blank\">my first post on this subject<\/a>, I&#8217;ve decided to write a couple follow-ups to add some more tips around this subject.\u00a0 <em>As a result, this is part 2 in a series of 5 posts on this subject.\u00a0 For background, please also see <a title=\"http:\/\/yourlinuxguy.com\/?p=635\" href=\"..\/?p=635\" target=\"_blank\">part 1<\/a>, <a title=\"http:\/\/yourlinuxguy.com\/?p=659\" href=\"..\/?p=659\" target=\"_blank\">part 3<\/a>, <a title=\"http:\/\/yourlinuxguy.com\/?p=661\" href=\"..\/?p=661\" target=\"_blank\">part 4<\/a>, and <a title=\"http:\/\/yourlinuxguy.com\/?p=663\" href=\"http:\/\/yourlinuxguy.com\/?p=663\" target=\"_blank\">part 5<\/a>.<\/em><\/em><\/p>\n<p>In &#8220;<a title=\"http:\/\/yourlinuxguy.com\/?p=635\" href=\"http:\/\/yourlinuxguy.com\/?p=635\" target=\"_blank\">Part 1<\/a>&#8220;, I instruct you to generate and export the Root CA certificate locally from the console of the CA server itself, for use in your SSL-based LDAPS query.\u00a0 But what if the CA root certificate had been generated some time ago, or you are not able to to conveniently access that server&#8217;s console for some reason?<\/p>\n<p>Luckily for you&#8230;\u00a0 Since this is a MS AD CA server, if you have the &#8220;World Wide Web Service&#8221; component of IIS, *and* the &#8220;Web Enrollment Support&#8221; component of the CA server service, then there is a built-in web-based utility to help you out.\u00a0 So given all that, here is a good alternate way to export the Root CA certificate from a Windows Certificate Authority:<\/p>\n<ul>\n<li>Go to http:\/\/&lt;caServer&gt;\/certsrv with a browser.\u00a0 Of course, replace &#8220;&lt;caServer&gt;&#8221; with your server name or address.<\/li>\n<li>Authenticate if needed, and follow the instructions to download the CA certificate in Base 64, which can install\/import it into the browser certificate store.<\/li>\n<li>Use the native browser certificate management tools to export it to file.<\/li>\n<\/ul>\n<p><em>Caveat:\u00a0 Remember, your MS server needs the &#8220;World Wide Web Service&#8221; component of IIS for this to work.\u00a0 Without it, you will either get no response or a broken service response&#8230;<\/em><\/p>\n<p>And that&#8217;s it!\u00a0 That sure beats the 8 steps in the other post.\u00a0 Now you can use the exported CA cert file to continue your LDAPSy fun&#8230;.<\/p>\n<p>\ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sub-Title:\u00a0 &#8220;An easier way to export a MS AD CA root cert&#8230;&#8221; After the popularity of my first post on this subject, I&#8217;ve decided to write a couple follow-ups to add some more tips around this subject.\u00a0 As a result,&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/yourLinuxGuy.com\/?p=649\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[10,47,20],"tags":[],"class_list":["post-649","post","type-post","status-publish","format-standard","hentry","category-introductory","category-linuxgeneral","category-windowsgeneral"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pnjn1-at","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts\/649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=649"}],"version-history":[{"count":7,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts\/649\/revisions"}],"predecessor-version":[{"id":653,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts\/649\/revisions\/653"}],"wp:attachment":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}