proc SetprimaryAdminId { user } {
puts "SetprimaryAdminId"
global AdminConfig
set userR [$AdminConfig list UserRegistry]
set security [$AdminConfig list Security]
foreach ur $userR {
if { [regexp "LDAP" $ur] } {
set ldap $ur
break
}
}
set LDAPPrimaryID [list primaryAdminId $user]
set ldapAttrs [list $LDAPPrimaryID]
$AdminConfig modify $ldap $ldapAttrs
set enableSec [list enabled true]
set enableAppSec [list appEnabled true]
set enforceJ2S [list enforceJava2Security false]
set activeUR [list activeUserRegistry $ldap]
set secAttrs [list $enableSec $enableAppSec $enforceJ2S $activeUR]
$AdminConfig modify $security $secAttrs
puts [$AdminConfig show $security]
$AdminConfig save
puts "Done configuring primaryAdminId"
}
SetprimaryAdminId "Administrator"
阅读(948) | 评论(0) | 转发(0) |