Removing Directory Services cofig
I am looking for the best way to do this - Need to remove a bunch of machines on my network from the AD & OD bindings. Is removing the Directory Services "folder" (& the edu.mit.kerberos file) a recommended way to do this, by doing the following:
rm -R -i DirectoryService
sudo shutdown -h now
Any known issues that would come up if I delete this folder?
Or if not, could someone help me with these commands. I tried the following commands and the removal from AD & OD were successful but I just cant seem to take out the "/Active Directory/All Domains" entry from the Authentication & Contact search path policies with these commands:
# Standard parameters
# Remove from AD
dsconfigad -f -r -a $computerid -domain $domain -u $udn -p "$password" -ou "$ou"
# Remove from OD
dsconfigldap -v -r myOD.com
# Restart DirectoryService
sudo dscl "/Active Directory/All Domains" -list /Computers > /dev/null
sudo dscl /Search -delete / CSPSearchPath /Active Directory/All Domains
sudo dscl /Search/Contacts -delete / CSPSearchPath /Active Directory/All Domains
sudo dscl /Search -delete / CSPSearchPath /LDAPv3/myOD.com
sudo dscl /Search/Contacts -delete / CSPSearchPath /LDAPv3/myOD.com
sudo -r /Library/Preferences/DirectoryService/SearchNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
sudo -r /Library/Preferences/DirectoryService/SearchNodeConfig "Search Policy" -int 3