Updating LDAP...
    'organizationalUnit', 'ou' => $LDAP['group_ou'] )); if ($ou_add == TRUE) { print "$li_good Created OU {$LDAP['group_dn']}\n"; } else { $error = ldap_error($ldap_connection); print "$li_fail Couldn't create {$LDAP['group_dn']}:
    $error
    \n"; $no_errors = FALSE; } } if (isset($_POST['setup_user_ou'])) { $ou_add = @ ldap_add($ldap_connection, $LDAP['user_dn'], array( 'objectClass' => 'organizationalUnit', 'ou' => $LDAP['user_ou'] )); if ($ou_add == TRUE) { print "$li_good Created OU {$LDAP['user_dn']}\n"; } else { $error = ldap_error($ldap_connection); print "$li_fail Couldn't create {$LDAP['user_dn']}:
    $error
    \n"; $no_errors = FALSE; } } if (isset($_POST['setup_last_gid'])) { $highest_gid = ldap_get_highest_id($ldap_connection,'gid'); $description = "Records the last GID used to create a Posix group. This prevents the re-use of a GID from a deleted group."; $add_lastgid_r = array( 'objectClass' => array('device','top'), 'serialnumber' => $highest_gid, 'description' => $description ); $gid_add = @ ldap_add($ldap_connection, "cn=lastGID,{$LDAP['base_dn']}", $add_lastgid_r); if ($gid_add == TRUE) { print "$li_good Created cn=lastGID,{$LDAP['base_dn']}\n"; } else { $error = ldap_error($ldap_connection); print "$li_fail Couldn't create cn=lastGID,{$LDAP['base_dn']}:
    $error
    \n"; $no_errors = FALSE; } } if (isset($_POST['setup_last_uid'])) { $highest_uid = ldap_get_highest_id($ldap_connection,'uid'); $description = "Records the last UID used to create a Posix account. This prevents the re-use of a UID from a deleted account."; $add_lastuid_r = array( 'objectClass' => array('device','top'), 'serialnumber' => $highest_uid, 'description' => $description ); $uid_add = @ ldap_add($ldap_connection, "cn=lastUID,{$LDAP['base_dn']}", $add_lastuid_r); if ($uid_add == TRUE) { print "$li_good Created cn=lastUID,{$LDAP['base_dn']}\n"; } else { $error = ldap_error($ldap_connection); print "$li_fail Couldn't create cn=lastUID,{$LDAP['base_dn']}:
    $error
    \n"; $no_errors = FALSE; } } if (isset($_POST['setup_default_group'])) { $group_add = ldap_new_group($ldap_connection,$DEFAULT_USER_GROUP); if ($group_add == TRUE) { print "$li_good Created default group: $DEFAULT_USER_GROUP\n"; } else { $error = ldap_error($ldap_connection); print "$li_fail Couldn't create default group:
    $error
    \n"; $no_errors = FALSE; } } if (isset($_POST['setup_admins_group'])) { $group_add = ldap_new_group($ldap_connection,$LDAP['admins_group']); if ($group_add == TRUE) { print "$li_good Created LDAP administrators group: {$LDAP['admins_group']}\n"; } else { $error = ldap_error($ldap_connection); print "$li_fail Couldn't create LDAP administrators group:
    $error
    \n"; $no_errors = FALSE; } } $admins = ldap_get_group_members($ldap_connection,$LDAP['admins_group']); if (count($admins) < 1) { ?>
    " method="post"> What's this?"; print ""; print "\n"; $show_create_admin_button = TRUE; } else { print "$li_good The LDAP account administrators group ({$LDAP['admins_group']}) isn't empty."; } ?>