Home › Forums › OS X Server and Client Discussion › Active Directory › Adding AD entries to the Auth and Contacts via script?
- This topic has 4 replies, 3 voices, and was last updated 21 years, 1 month ago by
superrcat.
-
AuthorPosts
-
September 7, 2005 at 8:14 pm #363163
John M
ParticipantIs it possible via a shell script to add an AD entry to the Authentication and Contacts tabs of Directory Access?
I can script the machine’s addition to the AD domain just fine, but then I have to go in to Directory Access manually and add the Auth and Contacts entries, which well … sort of defeats the point of using scripts.
In Panther, I could bind and unbing an image machine and the entries would remain, but Tiger seems to clean itself up better.
Any ideas?
Thanks!
September 8, 2005 at 12:33 am #363169fherbert
ParticipantYou can use the ‘defaults’ command as one way around this..
For the search path:
defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Node Custom Path Array" '("/Active Directory/All Domains")'And for the contacts path:
defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Node Custom Path Array" '("/Active Directory/All Domains")'These settings will be available in Directory access after a restart. Take note that they will be accepted, even if that directory node is not configured/existing.
NOTE: This will remove any existing custom contact and search node path you have..
Let me know how you get on.
Cheers
September 8, 2005 at 10:58 pm #363185fherbert
ParticipantYes, I’ve just read the new AD-OD paper with the section on using dscl for setting up the search path. I did check the man page for dscl but didn’t see any examples or stand out way to modify the search path…. I guess using dscl would be the better way??
October 6, 2005 at 2:41 pm #363502Anonymous
GuestMy question is how do you turn on AD using DSCl. I found the command to add the Authentication path. Just need to turn it on in 103 and 10.4
October 6, 2005 at 9:51 pm #363516superrcat
ParticipantTim Kendall wrote:
My question is how do you turn on AD using DSCl. I found the command to add the Authentication path. Just need to turn it on in 103 and 10.4
Eh. You could use defaults as in the previous post, but it has the same limitations since DirectoryService is already running…
defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" 'Active'
-
AuthorPosts
- You must be logged in to reply to this topic.