Turn Off macOS Directory Service Authentication

If you are migrating from Open Directory or Active Directory and you had set authentication from the command line with dsconfigad or dsconfigldap, you must run the following commands to stop the computer from trying to use the built-in directory service even if the Mac is not bound to it:

dscl . -delete /Computers
dscl /Search -delete / CSPSearchPath /LDAPv3/FQDNforYourDomainController
dscl /Search -delete / CSPSearchPath /Active\ Directory/All\ Domains
dscl /Search/Contacts -delete / CSPSearchPath /Active\ Directory/All\ Domains
dscl /Search/Contacts -delete / CSPSearchPath /LDAPv3/FQDNforYourDomainController