- Open the Terminal Application
- Type in
sudo -iand type in your Mac Administrator account password.sudogives you root level or administrator level privileges.
dsconfigad -show
dsconfigad -remove -username
<username>-password<password>[-localuser<localadmin>-localpassword<localpass>]
Note: <username> needs to be replaced with domain administrator who has binding/unbinding rights.
<computer-name> --> replace this with the computer name you want to bind to Active Directory
<username> --> needs to be replaced with domain administrator who has binding/unbinding rights.
<domain> --> replace with domain you want to join.
dsconfigad -add
<domain>-computer<computer-name>-username<username>-password<password>-ou "CN=Computers,DC=network,DC=example,DC=com" [-force] [-localuser<localadmin>-localpassword<localpass>] -mobile enable -mobileconfirm enable -localhome enable -useuncpath enable -protocol smb -groups "Domain Admins,Enterprise Admins" -alldomains enable -packetsign require -packetencrypt require
<computer-name> --> replace this with the computer name you want to bind to Active Directory
<username> --> needs to be replaced with domain administrator who has binding/unbinding rights.
<domain> --> replace with domain you want to join.
dsconfigad -add
<domain>-computer<computer-name>-username<username>-password<password>-ou "CN=Computers,DC=network,DC=example,DC=com" [-force] [-localuser<localadmin>-localpassword<localpass>] -localhome enable -useuncpath enable -protocol smb -groups "Domain Admins,Enterprise Admins" -alldomains enable -packetsign require -packetencrypt require
to force unbind:
sudo dsconfigad -force -remove -u johndoe -p nopasswordhere
username/password can be anything.