| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <!-- --- BEGIN COPYRIGHT BLOCK ---
- This Program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
- Foundation; version 2 of the License.
- This Program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along with
- this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- Place, Suite 330, Boston, MA 02111-1307 USA.
- In addition, as a special exception, Red Hat, Inc. gives You the additional
- right to link the code of this Program with code not covered under the GNU
- General Public License ("Non-GPL Code") and to distribute linked combinations
- including the two, subject to the limitations in this paragraph. Non-GPL Code
- permitted under this exception must only link to the code of this Program
- through those well defined interfaces identified in the file named EXCEPTION
- found in the source code files (the "Approved Interfaces"). The files of
- Non-GPL Code may instantiate templates or use macros or inline functions from
- the Approved Interfaces without causing the resulting work to be covered by
- the GNU General Public License. Only Red Hat, Inc. may make changes or
- additions to the list of Approved Interfaces. You must obey the GNU General
- Public License in all respects for all of the Program code and other code used
- in conjunction with the Program except the Non-GPL Code covered by this
- exception. If you modify this file, you may extend this exception to your
- version of the file, but you are not obligated to do so. If you do not wish to
- provide this exception without modification, you must delete this exception
- statement from your version and license this file solely under the GPL without
- exception.
-
- Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- Copyright (C) 2005 Red Hat, Inc.
- All rights reserved.
- --- END COPYRIGHT BLOCK --- -->
- <HEAD><TITLE>User Management</TITLE>
- <SCRIPT language=JavaScript>
- var didSetDefaults = 0;
- function resetForm()
- {
- if (document.modForm.dirsvctype[1].checked) {
- document.configuredForRemote = 1;
- document.modForm.host.focus();
- if (document.modForm.port.value == '') {
- document.modForm.port.value = '389';
- }
- } else {
- document.configuredForRemote = 0;
- }
- }
-
- function submitModify()
- {
- var theForm = document.modForm;
- // verify form fields
- if ( theForm.dirsvctype[1].checked ) { // remote directory server
- if ( theForm.host.value.length == 0 ) {
- alert( 'Please provide the host name of the LDAP server.' );
- return false;
- }
- if ( theForm.port.value.length == 0 ) {
- alert( 'Please provide the port number of the LDAP server.' );
- return false;
- }
- if ( theForm.port.value < 1 || theForm.port.value > 65535 ) {
- alert( 'The port number must be between 1 and 65535.' );
- return false;
- }
- if ( theForm.basedn.value.length == 0 ) {
- alert( 'Please provide a base DN.' );
- return false;
- }
- if ( theForm.bindpw.value.length > 0 &&
- theForm.binddn.value.length == 0 ) {
- alert( 'Please provide the Bind DN.' );
- return false;
- }
- }
- theForm.submit();
- return false;
- }
- function selectedSSL( doSSL )
- {
- var theForm = document.modForm;
- var onWrongPort, portDesc;
- // SSL On or SSL Off radio button was clicked on: offer to set the
- // port to the standard SSL or non-SSL one as appropriate.
- if ( doSSL ) {
- onWrongPort = ( theForm.port.value == 389 );
- portDesc = 'LDAP over SSL';
- stdPort = 636;
- } else {
- onWrongPort = ( theForm.port.value == 636 );
- portDesc = 'LDAP';
- stdPort = 389;
- }
- if ( onWrongPort && confirm( 'The standard port for ' + portDesc + ' is ' +
- stdPort + '.\nWould you like to switch to the standard port?' )) {
- theForm.port.value = stdPort;
- }
- }
- function checkForChange()
- {
- cTLMsg = 'If you switch to local database mode,\n' +
- 'any configuration data about directory servers\n' +
- 'will be lost. Go ahead and change to\n' +
- 'local database mode?';
- cTRMsg = 'To use a directory server, you must\n' +
- 'provide the host name, port, and base DN for\n' +
- 'an LDAP directory server. Go ahead and\n' +
- 'change to directory server mode?';
- if (document.modForm.dirsvctype[0].checked &&
- document.configuredForRemote) {
- if (confirm(cTLMsg)) {
- var tmp = document.location.href;
- if (document.location.search == "?CHANGE") {
- document.location.search = "";
- } else {
- document.location.href = tmp + "?CHANGE";
- }
- } else {
- document.modForm.dirsvctype[1].checked = true;
- }
- } else if (document.modForm.dirsvctype[1].checked &&
- !document.configuredForRemote) {
- if (confirm(cTRMsg)) {
- var tmp = document.location.href;
- if (document.location.search == "?CHANGE") {
- document.location.search = "";
- } else {
- document.location.href = tmp + "?CHANGE";
- }
- } else {
- document.modForm.dirsvctype[0].checked = true;
- }
- }
- }
- </SCRIPT>
- </HEAD>
- <!-- BODY "onLoad='resetForm()'" -->
- <CENTER><TABLE BORDER="2" CELLPADDING="10" WIDTH="100%">
- <TR><TD ALIGN="center" WIDTH="100%">
- <FONT SIZE="+2"><B>Configure Directory Service</B></FONT>
- </TD></TR></TABLE></CENTER>
- <!-- DS_INLINE_POST_RESULTS -->
- <FORM METHOD="POST" ACTION="dsconfig" NAME="modForm">
- <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%>
- <TR>
- <TD ALIGN="right" NOWRAP><B>Obtain Directory Service From:</B></TD>
- <TD>
- <INPUT TYPE="radio" NAME="dirsvctype"
- VALUE="local"
- <!-- DS_CHECKED_IF_LOCAL -->
- onClick="checkForChange(this);">Local Database
- <BR>
- <INPUT TYPE="radio" NAME="dirsvctype"
- VALUE="remote"
- <!-- DS_CHECKED_IF_REMOTE -->
- onClick="checkForChange(this);">LDAP Directory Server
- </TD>
- </TR>
- </TABLE>
- <HR>
- <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%>
- <TR><TD COLSPAN="2" ALIGN="center">
- <!-- DS_CONFIG_INFO -->
- <BR>
- </B></TD></TR>
- <!-- DS_HOSTNAME_VALUE -->
- <!-- DS_PORT_VALUE -->
- <!-- DS_SSL_CONFIG_VALUE -->
- <!-- DS_BASEDN_VALUE -->
- <!-- DS_BINDDN_VALUE -->
- <!-- DS_BINDPASSWD_VALUE -->
- </TABLE>
- <P>
- <CENTER><TABLE BORDER="2" WIDTH="100%">
- <TR>
- <TD WIDTH="33%" ALIGN="center"><INPUT TYPE="button" VALUE=" Save Changes "
- onClick="submitModify()"></TD>
- <TD WIDTH=34% ALIGN=center><INPUT TYPE="reset" VALUE=" Reset "
- onClick="resetForm()"></TD>
- <TD WIDTH=33% ALIGN=center>
- <!-- HELPBUTTON "DSCONFIG" -->
- </TD>
- </TR></TABLE></CENTER>
- </FORM>
- <!-- DS_NOCERTFILE_WARNING "<SCRIPT language=JavaScript>alert('For the Users and Groups forms to work over SSL, you need to activate SSL for this Administration Server.\nChoose Encryption|On/Off to do so.');</SCRIPT>" -->
- <!-- ENDHTML -->
|