Binding to AD Computer Name copied to Computer ID

Not applicable

How do you put a computer ID in the directory utility when doing a pre-stage? I am having a hard time joining my Macs after we run netboot and prestage each Mac. The machines are not binding and also the Computer ID should be the computer name. Does anyone have a script or a method to have the machine bind and put the computer name into the computer ID?

![external image link](attachments/7cf9e39f069c4d4bbfa23368cb8b902a)
Neal Smith | MAC Systems Engineer | Perrigo IT

4 REPLIES 4

tlarkin
Honored Contributor

for OD

/usr/sbin/dsconfigldap -f -v -e -a mycompany.server.com -u diradmin -p diradmin_password -c `/usr/sbin/networksetup -getcomputername` -l localadmin -q localadmin_pw

This will bind your client in OD with the proper computer name and you can make computer groups

![external image link](attachments/0f44fc3fce474784a659c93850cc0647)

tlarkin
Honored Contributor

oops

For AD use

dsconfigad instead of dsconfigldap

syntax should be similar.

![external image link](attachments/3bb661a97b3440998dd3ae60155fe1d5)

VCCPHelpdesk
New Contributor

how do you set the additional options for "create mobile account". "Allow authentication from any domain in the forest", and the preferred domain server through script?

lisacherie
Contributor II

@VCCPHelpdesk

You can run the dsconfigad command on the terminal to see the available options to add to your script. There are many more, these are just the ones you mentioned.

-preferred server fully-qualified domain name of preferred server to query
-nopreferred do not use a preferred server for queries
-alldomains flag 'enable' or 'disable' allow authentication from any domain
-mobile flag 'enable' or 'disable' mobile user accounts for offline use
-mobileconfirm flag 'enable' or 'disable' warning for mobile account creation