Command to clear custom paths from Search Policy in Directory Utility?

tomt
Valued Contributor

We are getting ready for a domain migration of our Active Directory. I've built a policy that uses the unbindAD script from the Resource Kit and then binds the machine to the new domain. The policy is set up as a self service for our techs only.

The issue I am having is that after the un/rebind there are duplicate entries for Active Directory/All Domains in the Search Policy section of the Directory Utility. They appear under both the Authentication and Contacts tabs.

My thought is to create another script that will run before the rebind to reset the search policy settings to factory (only /Local/Default and /BSD/local). Can anyone point me towards the appropriate terminal command or have any thoughts on this?

Thanks for any help,
Tom
------------------------------
Tom Tubbiola
Design IT
Ttubbiola at oakley.com
949.900.7705

4 REPLIES 4

jarednichols
Honored Contributor

There's a specific plist that contains this info. If you kill the plist you should be ok. It's in /Library/Preferences/DirectoryService/SearchNodeConfig.plist

YMMV, test test test, I am not a lawyer… Etc…

j
--
Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436

tlarkin
Honored Contributor

dsconfigldap -r myserver.com

should remove all bindings

jonscott
New Contributor

I've also used:
dscl /Search/Contacts –delete / CSPSearchPath /whatever
dscl /Seach –delete / CSPSearchPath /whatever

to clear those settings from Contacts and Authentication…

tomt
Valued Contributor

Thanks guys, I'll do some testing right now.

Tom
------------------------------
Tom Tubbiola
Design IT
Ttubbiola at oakley.com
949.900.7705