{"id":2454,"date":"2016-02-06T23:49:57","date_gmt":"2016-02-06T23:49:57","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=2454"},"modified":"2016-02-06T23:55:36","modified_gmt":"2016-02-06T23:55:36","slug":"using-dscl-to-config-ad-search-paths","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=2454","title":{"rendered":"Using DSCL to config AD Search Paths"},"content":{"rendered":"<p>dsconfigad command:<\/p>\n<p>\u2022 Bind to AD:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">dsconfigad -a clientname -domain domain.name -u adminname -p adpassword -lu localadmin -lp lapasswd<\/div><\/div>\n<p>\u2022 Add the AD to the search path:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo dscl \/Search -create \/ SearchPolicy CSPSearchPath<br \/>\nsudo dscl \/Search -append \/ CSPSearchPath \u201cActive Directory\/ All Domains\u201d<\/div><\/div>\n<p>\u2022 Add the AD to the Contacts search path:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo dscl \/Search\/Contacts -create \/ SearchPolicy CSPSearchPath<br \/>\nsudo dscl \/Search\/Contacts -append \/ CSPSearchPath \u201cActive Directory\/All Domains\u201d<\/div><\/div>\n<p>\u2022 Force DirectoryService to restart and load the new configurations<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo killall DirectoryService<\/div><\/div>\n<p>\u2022 To Remove All Domains and set only a one Domain in the Forest for Auth and Contacts<\/p>\n<p>First set all domain authentication off<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">dsconfigad -alldomains disable<\/div><\/div>\n<p>Then remove the all domains from search and contacts and add only the domain you want to use<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">dscl \/Search -delete \/ CSPSearchPath &quot;\/Active Directory\/domain\/All Domains&quot;<br \/>\ndscl \/Search -append \/ CSPSearchPath &quot;\/Active Directory\/domain\/domain.com&quot;<br \/>\ndscl \/Search\/Contacts -delete \/ CSPSearchPath &quot;\/Active Directory\/domain\/All Domains&quot;<br \/>\ndscl \/Search\/Contacts -append \/ CSPSearchPath &quot;\/Active Directory\/domain\/domain.com&quot;<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>dsconfigad command: \u2022 Bind to AD: dsconfigad -a clientname -domain domain.name -u adminname -p adpassword -lu localadmin -lp lapasswd \u2022 Add the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2454","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2454"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2454\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}