Centrify NIS Maps Auto Deploy

Use the File Copy GPO from Centrify to copy the script below to the directory /usr/share/centrifydc/mappers/machine (assure the execute bit is on).


#!/bin/sh
# the next line restarts using tclsh \
exec adedit "$0" "$@"
bind -machine [adinfo domain]
slz [adinfo zone]
foreach map [get_nis_maps] {
    if ([regexp "auto*" $map]) {
                puts "Map is $map"
                slnm $map
                set output [open /etc/$map w 0644]
                foreach line [gnm] {
                    set entry [regsub -all "\{|\}" $line ""]
                    puts $output [regsub ":1|{|}" $entry ""]
                }
    close $output
    }
}

Source http://community.centrify.com/t5/Centrify-Server-Suite/NIS-Maps/m-p/20250#M223