mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Work on CentOS 6+ support for LDAP client
This commit is contained in:
20
ldap-client/atboot.cgi
Executable file
20
ldap-client/atboot.cgi
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Enable the LDAP client daemon at boot or not
|
||||
|
||||
require './ldap-client-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
&foreign_require("init");
|
||||
my $starting = &init::action_status($config{'init_name'});
|
||||
if ($starting == 1 && $in{'boot'}) {
|
||||
&init::enable_at_boot($config{'init_name'});
|
||||
&webmin_log("atboot");
|
||||
}
|
||||
elsif ($starting == 2 && !$in{'boot'}) {
|
||||
# Disable at boot
|
||||
&init::disable_at_boot($config{'init_name'});
|
||||
&webmin_log("delboot");
|
||||
}
|
||||
|
||||
&redirect("");
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
auth_ldap=/etc/pam_ldap/auth_ldap.conf
|
||||
secret=/etc/ldap.secret
|
||||
init_name=nslcd
|
||||
|
||||
3
ldap-client/config-CentOS-Linux-6.0-*
Normal file
3
ldap-client/config-CentOS-Linux-6.0-*
Normal file
@@ -0,0 +1,3 @@
|
||||
auth_ldap=/etc/nslcd.conf
|
||||
secret=/etc/ldap.secret
|
||||
init_name=nslcd
|
||||
@@ -1,3 +1,4 @@
|
||||
auth_ldap=/etc/libnss-ldap.conf
|
||||
secret=/etc/ldap.secret
|
||||
pam_ldap=/etc/pam_ldap.conf
|
||||
init_name=nslcd
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
auth_ldap=/etc/ldap.conf
|
||||
secret=/etc/ldap.secret
|
||||
init_name=nslcd
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
auth_ldap=/etc/libnss-ldap.conf
|
||||
pam_ldap=/etc/pam_ldap.conf
|
||||
secret=/etc/libnss-ldap.secret /etc/pam_ldap.secret
|
||||
init_name=nslcd
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
auth_ldap=/etc/ldap.conf
|
||||
secret=/etc/ldap.secret
|
||||
init_name=nslcd
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
auth_ldap=/etc/openldap/ldap.conf
|
||||
secret=/etc/ldap.secret
|
||||
init_name=nslcd
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
auth_ldap=/etc/ldap.conf /etc/openldap/ldap.conf
|
||||
secret=/etc/ldap.secret
|
||||
init_name=nslcd
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
auth_ldap=LDAP client configuration files,8
|
||||
pam_ldap=PAM LDAP configuration file,3,Same as LDAP client file
|
||||
secret=Root LDAP client password files,9,50,2,\t
|
||||
init_name=Local LDAP daemon init script name,0
|
||||
line0=LDAP browser and validation settings,11
|
||||
ldap_hosts=LDAP server hosts,3,From config file,50
|
||||
ldap_port=LDAP server port,3,From config file,5
|
||||
|
||||
@@ -37,11 +37,37 @@ if ($config{'pam_ldap'} && -r $config{'pam_ldap'} && !$config{'nofixpam'} &&
|
||||
@icons = map { "images/".$_.".gif" } @pages;
|
||||
&icons_table(\@links, \@titles, \@icons, 5);
|
||||
|
||||
# Validate button
|
||||
print &ui_hr();
|
||||
print &ui_buttons_start();
|
||||
|
||||
# Validate button
|
||||
print &ui_buttons_row("check.cgi", $text{'index_check'},
|
||||
$text{'index_checkdesc'});
|
||||
|
||||
# LDAP server daemon
|
||||
&foreign_require("init");
|
||||
if ($config{'init_name'} &&
|
||||
($st = &init::action_status($config{'init_name'}))) {
|
||||
# Start or stop
|
||||
# XXX wrong function
|
||||
if (&init::action_running($config{'init_name'}) == 1) {
|
||||
print &ui_buttons_row("stop.cgi", $text{'index_stop'},
|
||||
$text{'index_stopdesc'});
|
||||
}
|
||||
else {
|
||||
print &ui_buttons_row("start.cgi", $text{'index_start'},
|
||||
$text{'index_startdesc'});
|
||||
}
|
||||
|
||||
# Start at boot
|
||||
print &ui_buttons_row("atboot.cgi",
|
||||
$text{'index_atboot'},
|
||||
$text{'index_atbootdesc'},
|
||||
undef,
|
||||
&ui_radio("boot", $st == 2 ? 1 : 0,
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
}
|
||||
|
||||
print &ui_buttons_end();
|
||||
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
|
||||
@@ -6,6 +6,12 @@ index_fixpam=<b>Warning</b> - Webmin has detected two separate LDAP configuratio
|
||||
index_fix=Fix by Linking Files
|
||||
index_ignore=Don't Show This Message
|
||||
index_ldapmod=LDAP Client
|
||||
index_stop=Stop LDAP Client Daemon
|
||||
index_stopdesc=Shut down the local LDAP client daemon, which is needed to query the remote LDAP server.
|
||||
index_start=Start LDAP Client Daemon
|
||||
index_startdesc=Start up the local LDAP client daemon, which is needed to query the remote LDAP server. Until it is started, users and groups in LDAP will not be accessible.
|
||||
index_atboot=Start LDAP Client At Boot
|
||||
index_atbootdesc=Changes whether the LDAP client daemon is started when the system boots up or not.
|
||||
|
||||
server_title=LDAP Server Configuration
|
||||
server_header=LDAP server and login options
|
||||
@@ -132,6 +138,7 @@ order_nisplus=NIS+
|
||||
order_nis=NIS
|
||||
order_dns=DNS
|
||||
order_files=Files
|
||||
order_sss=System Security Services
|
||||
order_db=DB Files
|
||||
order_compat=NIS & Files
|
||||
order_hesiod=Hesiod
|
||||
@@ -201,6 +208,10 @@ log_server=Modified LDAP server configuration
|
||||
log_base=Modified LDAP search bases
|
||||
log_pam=Modified authentication options
|
||||
log_modify_switch=Changed service $1
|
||||
log_atboot=Enabled LDAP client daemon at boot time
|
||||
log_delboot=Disabled LDAP client daemon at boot time
|
||||
log_start=Started LDAP client daemon
|
||||
log_stop=Stopped LDAP client daemon
|
||||
|
||||
check_title=Validating LDAP Configuration
|
||||
check_base=Finding LDAP base for users ..
|
||||
|
||||
13
ldap-client/start.cgi
Executable file
13
ldap-client/start.cgi
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Start the LDAP client daemon
|
||||
|
||||
require './ldap-client-lib.pl';
|
||||
&error_setup($text{'start_err'});
|
||||
|
||||
&foreign_require("init");
|
||||
($ok, $out) = &init::start_action($config{'init_name'});
|
||||
$ok || &error($out);
|
||||
|
||||
&webmin_log("start");
|
||||
&redirect("");
|
||||
|
||||
13
ldap-client/stop.cgi
Executable file
13
ldap-client/stop.cgi
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Stop the LDAP client daemon
|
||||
|
||||
require './ldap-client-lib.pl';
|
||||
&error_setup($text{'stop_err'});
|
||||
|
||||
&foreign_require("init");
|
||||
($ok, $out) = &init::stop_action($config{'init_name'});
|
||||
$ok || &error($out);
|
||||
|
||||
&webmin_log("stop");
|
||||
&redirect("");
|
||||
|
||||
Reference in New Issue
Block a user