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
  • Save cybertk/01e0fce074e9ed58edb4 to your computer and use it in GitHub Desktop.
Save cybertk/01e0fce074e9ed58edb4 to your computer and use it in GitHub Desktop.

Revisions

  1. @bzerangue bzerangue revised this gist Oct 8, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions macs-on-active-directory.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ _Note: `<username>` needs to be replaced with domain administrator who has bindi
    `<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
    > 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
    * * *

    @@ -31,4 +31,4 @@ _Note: `<username>` needs to be replaced with domain administrator who has bindi
    `<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
    > 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
  2. @bzerangue bzerangue revised this gist Oct 8, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions macs-on-active-directory.md
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,10 @@
    - 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 <username>
  3. @bzerangue bzerangue revised this gist Oct 8, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion macs-on-active-directory.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@

    #### To Unbind a Computer from an Active Directory Domain

    > dsconfigad -f -r -u <username>`
    > dsconfigad -f -r -u <username>
    _Note: `<username>` needs to be replaced with domain administrator who has binding/unbinding rights._

  4. @bzerangue bzerangue revised this gist Oct 8, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions macs-on-active-directory.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@

    #### To Unbind a Computer from an Active Directory Domain

    `dsconfigad -f -r -u <username>`
    > dsconfigad -f -r -u <username>`
    _Note: `<username>` needs to be replaced with domain administrator who has binding/unbinding rights._

    @@ -17,7 +17,7 @@ _Note: `<username>` needs to be replaced with domain administrator who has bindi
    `<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`
    > 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
    * * *

    @@ -27,4 +27,4 @@ _Note: `<username>` needs to be replaced with domain administrator who has bindi
    `<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`
    > 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
  5. @bzerangue bzerangue revised this gist Oct 8, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion macs-on-active-directory.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ _Note: `<username>` needs to be replaced with domain administrator who has bindi
    `<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`
    > `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`
    * * *

  6. @bzerangue bzerangue created this gist Oct 8, 2013.
    30 changes: 30 additions & 0 deletions macs-on-active-directory.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # 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 Unbind a Computer from an Active Directory Domain

    `dsconfigad -f -r -u <username>`

    _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`