# -*- tcl -*- \ exec /usr/local/md/sbin/edmsh "$0" ${1+"$@"} # Alfonso Lopez Murcia - Jul 2000 # This script sequentially: # o Bind to the server # o Move to right DN # o Create new cross references # Para saber mas de los parametros mirar # /usr/local/md/lib/edmlib/DMI_create.tcl set user "cn=DSA Manager, cn=trogon, ou=Facultad de Informatica, o=Universidad de Murcia, c=ES" set password "miclave" set template "/templates/" # Fecha: 11/07/2000 # Fuente: ftp://ftp.rediris.es/rediris/ldap/db/c%3dES.EDB set listaserv [list unirioja uji] set prefix "c=ES" # Bind to Server if {[catch {dmi open \ -call trogon \ -user "$user" \ -password "$password" \ -simple } err]} { puts "cannot bind to server: $err" return "$err" } else { puts "bind to server" } # Move to right DN if {[catch {dmi base "$prefix" } err]} { puts "cannot move to <$prefix>: $err" return "$err" } else { puts "now in <$prefix>" } # Create new cross references foreach newxr $listaserv { if {[catch {dmi add \ -xr \ -template "$template$newxr" \ -noedit } err]} { puts "cross reference not created: $err" return "$err" } else { puts "cross reference domain $newxr.es created" } }