Mac Join Domain Command Line
Finally and this should come as no surprise to windows server administrators you will need to perform the domain join either as a domain administrator or as a user account that has been delegated the privilege to join workstations to the domain.
Mac join domain command line. Some times we may need to do this from command line or from a batch file without any user interaction. It is tested on os x 10 6 10 7 and 10 8 combined with a windows server 2003 2008 2012 mixed active directory domain and a fedora 389 ds domain and an openldap domain. Bind using the command line.
Type net computer computername add then press enter. Add a computer to the domain. Joining a mac to a your domain is not for the faint of heart and can get tricky depending on your environment.
For example the following command can be used to bind a mac to active directory. 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. We can join a computer to a domain from system properties window.
This little snippet joins an mac os x computer to a windows active directory or openldap directory domain from the command line or via apple remote desktop. You can use the dsconfigad command in the terminal app to bind a mac to active directory. Script to enable ssh rename computer and join ad domain on mac mountain lion script to enable ssh rename computer and join ad domain on mac mountain lion here is a script we are using as a post installation task to enable ssh set the computer name and then join the computer to our active directory managed domain.
Directory utility and the directory payload functionality are accessible from the command line interface with the dsconfigad command. For example you can use the following command to join a system to active directory. Add a mac os x computer to active directory.
There can be issues with joining macs to a local domain and there can also be reverse dns issues to be aware of. Below is the command we need to run for joining the machine to a domain. Netdom join computername domain domainname.