%access = &get_module_acl();
$access{'switch'} = 0 if (&is_readonly_mode());
-# XXX LDAP support
-# XXX schema test / creation?
# XXX CHANGELOG / docs
# XXX test with Virtualmin
$text{'sql_groupclass'},
&ui_textbox("ldap_groupclass", $proto eq "ldap" && $args->{'groupclass'} ?
$args->{'groupclass'} : "webminGroup",30));
+push(@ldapgrid,
+ &ui_submit($text{'sql_schema'}, 'schema'), "");
$ldapgrid = &ui_grid_table(\@ldapgrid, 2, 100);
print &ui_table_row(undef,
sql_dnerr=User and group database settings are valid, but the LDAP DN needed by Webmin is missing : $1
sql_dnerr2=Click the <b>Create DN</b> button below to have it create automatically, or add it to your LDAP server manually.
sql_makedn=Create DN
+sql_schema=Download LDAP Schema
make_title=Create User and Group Tables
make_err=Failed to create user and group tables
makedn_done=.. done
makedn_still=Some problems were found even after DN creation : $1
+schema_title=Download LDAP Schema
+schema_desc=Before Webmin can use an LDAP server to store users and groups it must be configured to use the schema below. This can typically be done by saving the schema definition in <tt>/etc/ldap/schema</tt> or <tt>/etc/openldap/schema</tt> as <tt>webmin.schema</tt>, then configuring the server to load that schema file.
+schema_download=Download schema file : <a href=$1>$1</a>
&error_setup($text{'sql_err'});
$p = $in{'proto'};
+if ($in{'schema'}) {
+ # Redirect to schema download page
+ &redirect("schema.cgi");
+ return;
+ }
+
# Parse inputs
if ($p eq 'mysql' || $p eq 'postgresql' || $p eq 'ldap') {
gethostbyname($in{$p."_host"}) ||
--- /dev/null
+#!/usr/local/bin/perl
+# Just display the Webmin LDAP schema
+
+require './acl-lib.pl';
+$access{'pass'} || &error($text{'sql_ecannot'});
+
+&ui_print_unbuffered_header(undef, $text{'schema_title'}, "");
+
+print $text{'schema_desc'},"<p>\n";
+print &ui_table_start(undef, undef, 2);
+print &ui_table_row(undef,
+ "<pre>".&html_escape(&read_file_contents("webmin.schema"))."</pre>", 2);
+print &ui_table_end();
+print &text('schema_download', 'webmin.schema'),"<p>\n";
+
+&ui_print_footer("", $text{'index_return'});
+