Home Forums OS X Server and Client Discussion Active Directory script for binding to AD (default write SearchNodeConfig question)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #375688
    alternapop
    Participant

    i’m playing around with the script that is frequently referred to for binding a mac client to AD.

    part of this script does this:

    [code]sudo defaults write /Library/Preferences/DirectoryService/SearchNodeConfig “Search Node Custom Path Array” -array “/Active Directory/All Domains”
    sudo defaults write /Library/Preferences/DirectoryService/SearchNodeConfig “Search Policy” -int 3
    sudo plutil -convert xml1 /Library/Preferences/DirectoryService/SearchNodeConfig.plist[/code]

    i believe that for our environment, i’d like two custom paths instead of just the one added via the above command.

    /Active Directory/domain.net.example.edu
    /Active Directory/All Domains

    i’ve played around with this with “defaults write” but can’t seem to get it to work. can anyone help me out?

    i’m thinking that it’s via something along the lines of:

    [code]sudo defaults write /Library/Preferences/DirectoryService/SearchNodeConfig “Search Node Custom Path Array” -array “/Active Directory/domain.net.example.edu” “/Active Directory/All Domains”[/code]

    this gets added, but viewing via Directory Utility doesn’t display both as if they were added via the gui.

    thanks,
    chris

    #375689
    alternapop
    Participant

    it looks like this does work but i had to reboot the machine for it to show up in the Directory Utility gui.

    what command can i use to flush this without rebooting?

    thanks!

    #375690
    Magus255
    Participant

    Obviously you figured out that your line is right for the multiple items. To get it to take effect you just need to kill Directory Services. killall DirectoryService will work for that and it will restart itself. I don’t remember for sure if that makes the change show up in the gui but it does cause Directory Service to refresh and make your new settings take effect.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed