-2

I have searched the stacks fairly thoroughly to find a scripting language-based command that can help me develop a script to be executed on Macs capable of actually generating (NOT SIMPLY BINDING) those Macs as computer objects in Active Directory. I have found several excellent scripts that BIND Macs, but THEY ONLY BIND THE COMPUTER WHEN THE COMPUTER OBJECT HAS BEEN PREVIOUSLY GENERATED IN ACTIVE DIRECTORY. I have a working script that functionally unbinds and then binds a computer to AD, but only when a computer object is already present AND the computerName variable given during the bind runtime matches the name of that computer object already present in AD. All of the scripts that I've seen, and the one that I have been using, use the BASH dsconfigad utility, but this does not actually delete or generate computer objects (at any privilege level).

5
  • The standard binding command (dsconfig -add) should create a computer object if none exists. You need to troubleshoot why this is not happening, rather than looking for a different command. Oct 21, 2014 at 15:21
  • Have you actually been witness to dsconfigad -add generating computer objects? Just looking for Yes or No here. Oct 21, 2014 at 15:27
  • Yes, although it's been a while since I've used it... Oct 22, 2014 at 3:53
  • I'm unable to respond at length right now, Gordon, as I'm only able to comment from my android phone, but I'm going to respond more to your previous comment tomorrow and hope our dialog regarding this issue continues. Oct 22, 2014 at 6:03
  • @Gordon Davisson - I suspected that if it wasn't the dsconfigad utility limiting the functionality I desired, then it was a permissions discrepancy. It was of course the latter... Nov 4, 2014 at 15:45

1 Answer 1

1

The Directory Services Configuration for Active Directory Utility (DSCONFIGAD), developed and offered by Apple, is fully capable of generating and binding Active Directory computer objects. OS X utility commands such as DSCL, DSCACHE, DSCONFIGAD, DSEDITGROUP, etc., however, must be executed as Root. Initially, I failed to do this, hence my question and confusion above, both of which have been resolved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .