Skip to content

Instantly share code, notes, and snippets.

@cybertk
Forked from bzerangue/macs-on-active-directory.md
Created November 25, 2015 16:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cybertk/01e0fce074e9ed58edb4 to your computer and use it in GitHub Desktop.
Save cybertk/01e0fce074e9ed58edb4 to your computer and use it in GitHub Desktop.
Binding and Unbinding to Active Directory from Mac OS via Command Line

Binding and Unbinding to Active Directory from Mac OS via Command Line

  • Open the Terminal Application
  • Type in sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.

To View current Active Directory Settings

dsconfigad -show

To Unbind a Computer from an Active Directory Domain

dsconfigad -f -r -u

Note: <username> needs to be replaced with domain administrator who has binding/unbinding rights.


To Bind a Mac Laptop Computer to an Active Directory Domain

<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 -a <computer-name> -u <username> -ou "CN=Computers,DC=network,DC=pcpc,DC=org" -domain <domain> -mobile enable -mobileconfirm enable -localhome enable -useuncpath enable -groups "Domain Admins,Enterprise Admins" -alldomains enable


To Bind a Mac Desktop Computer to an Active Directory Domain

<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 -a <computer-name> -u <username> -ou "CN=Computers,DC=network,DC=pcpc,DC=org" -domain <domain> -localhome enable -useuncpath enable -groups "Domain Admins,Enterprise Admins" -alldomains enable

@cybertk
Copy link
Author

cybertk commented Nov 25, 2015

@cybertk
Copy link
Author

cybertk commented Nov 29, 2015

Encounter this issue after joined domain

screen shot 2015-11-29 at 22 31 52

@cybertk
Copy link
Author

cybertk commented Nov 29, 2015

Another Issue

dsconfigad: Node name wasn't found. (2000)


updated solution

This issue is fixed by adjust system time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment