X7ROOT File Manager
Current Path:
/usr/libexec/webmin/ldap-client
usr
/
libexec
/
webmin
/
ldap-client
/
📁
..
📄
CHANGELOG
(1.1 KB)
📄
atboot.cgi
(483 B)
📄
browser.cgi
(2.29 KB)
📄
check.cgi
(2.93 KB)
📄
config-ALL-linux
(79 B)
📄
config-AlmaLinux-6.0-ALL
(66 B)
📄
config-CentOS-Linux-6.0-ALL
(66 B)
📄
config-CentOS-Stream-Linux-8.0-ALL
(66 B)
📄
config-Oracle-Linux-8.0-ALL
(66 B)
📄
config-Redhat-Enterprise-Linux-6.0-ALL
(66 B)
📄
config-Rocky-Linux-6.0-ALL
(66 B)
📄
config-Scientific-Linux-6.0-ALL
(66 B)
📄
config-debian-linux-3.1
(100 B)
📄
config-debian-linux-4.0-5.9
(65 B)
📄
config-debian-linux-6.0-6.9
(128 B)
📄
config-debian-linux-7.0-ALL
(65 B)
📄
config-pardus-linux
(74 B)
📄
config-redhat-linux-13.0-ALL
(89 B)
📄
config.info
(556 B)
📄
config.info.ca
(732 B)
📄
config.info.de
(593 B)
📄
config.info.nl
(473 B)
📄
config.info.no
(528 B)
📄
config.info.pt_BR
(599 B)
📄
cpan_modules.pl
(82 B)
📄
edit_base.cgi
(2.47 KB)
📄
edit_pam.cgi
(1.36 KB)
📄
edit_server.cgi
(3.27 KB)
📄
edit_switch.cgi
(1.74 KB)
📄
fixpam.cgi
(364 B)
📁
help
📁
images
📄
index.cgi
(2.36 KB)
📄
install_check.pl
(334 B)
📁
lang
📄
ldap-client-lib.pl
(11.53 KB)
📄
list_switches.cgi
(772 B)
📄
log_parser.pl
(461 B)
📄
module.info
(158 B)
📄
module.info.af
(0 B)
📄
module.info.af.auto
(96 B)
📄
module.info.ar
(0 B)
📄
module.info.ar.auto
(122 B)
📄
module.info.be
(0 B)
📄
module.info.be.auto
(144 B)
📄
module.info.bg
(0 B)
📄
module.info.bg.auto
(161 B)
📄
module.info.ca
(97 B)
📄
module.info.cs
(0 B)
📄
module.info.cs.auto
(105 B)
📄
module.info.da
(0 B)
📄
module.info.da.auto
(97 B)
📄
module.info.de
(99 B)
📄
module.info.el
(0 B)
📄
module.info.el.auto
(148 B)
📄
module.info.es
(0 B)
📄
module.info.es.auto
(99 B)
📄
module.info.eu
(0 B)
📄
module.info.eu.auto
(106 B)
📄
module.info.fa
(0 B)
📄
module.info.fa.auto
(159 B)
📄
module.info.fi
(0 B)
📄
module.info.fi.auto
(110 B)
📄
module.info.fr
(0 B)
📄
module.info.fr.auto
(120 B)
📄
module.info.he
(0 B)
📄
module.info.he.auto
(126 B)
📄
module.info.hr
(0 B)
📄
module.info.hr.auto
(99 B)
📄
module.info.hu
(0 B)
📄
module.info.hu.auto
(117 B)
📄
module.info.it
(0 B)
📄
module.info.it.auto
(95 B)
📄
module.info.ja
(0 B)
📄
module.info.ja.auto
(144 B)
📄
module.info.ko
(0 B)
📄
module.info.ko.auto
(128 B)
📄
module.info.lt
(0 B)
📄
module.info.lt.auto
(108 B)
📄
module.info.lv
(0 B)
📄
module.info.lv.auto
(99 B)
📄
module.info.ms
(103 B)
📄
module.info.mt
(0 B)
📄
module.info.mt.auto
(107 B)
📄
module.info.nl
(20 B)
📄
module.info.nl.auto
(83 B)
📄
module.info.no
(20 B)
📄
module.info.no.auto
(80 B)
📄
module.info.pl
(0 B)
📄
module.info.pl.auto
(95 B)
📄
module.info.pt
(0 B)
📄
module.info.pt.auto
(101 B)
📄
module.info.pt_BR
(24 B)
📄
module.info.pt_BR.auto
(83 B)
📄
module.info.ro
(0 B)
📄
module.info.ro.auto
(105 B)
📄
module.info.ru
(0 B)
📄
module.info.ru.auto
(170 B)
📄
module.info.sk
(0 B)
📄
module.info.sk.auto
(108 B)
📄
module.info.sl
(0 B)
📄
module.info.sl.auto
(102 B)
📄
module.info.sv
(0 B)
📄
module.info.sv.auto
(104 B)
📄
module.info.th
(0 B)
📄
module.info.th.auto
(204 B)
📄
module.info.tr
(0 B)
📄
module.info.tr.auto
(123 B)
📄
module.info.uk
(0 B)
📄
module.info.uk.auto
(146 B)
📄
module.info.ur
(0 B)
📄
module.info.ur.auto
(189 B)
📄
module.info.vi
(0 B)
📄
module.info.vi.auto
(145 B)
📄
module.info.zh
(0 B)
📄
module.info.zh.auto
(84 B)
📄
module.info.zh_TW
(0 B)
📄
module.info.zh_TW.auto
(90 B)
📄
popup_browser.cgi
(2.73 KB)
📄
restart.cgi
(329 B)
📄
save_base.cgi
(1.86 KB)
📄
save_pam.cgi
(1.31 KB)
📄
save_server.cgi
(3.53 KB)
📄
save_switch.cgi
(932 B)
📄
start.cgi
(282 B)
📄
stop.cgi
(254 B)
📄
switch-lib.pl
(3.08 KB)
Editing: save_server.cgi
#!/usr/bin/perl # Save the LDAP server to connect to require './ldap-client-lib.pl'; &error_setup($text{'server_err'}); &ReadParse(); &lock_file(&get_ldap_config_file()); @secrets = split(/\t+/, $config{'secret'}); foreach $secret (@secrets) { &lock_file($secret); } $conf = &get_config(); $uri = &find_svalue("uri", $conf); # Validate and save inputs if ($uri) { # Save uri directive for($i=0; defined($host = $in{'uhost_'.$i}); $i++) { next if (!$host); $port = $in{'uport_'.$i.'_def'} ? undef : $in{'uport_'.$i}; $proto = $in{'uproto_'.$i}; !defined($port) || $port =~ /^\d+$/ && $port > 0 && $port < 65536 || &error(&text('server_euport', $host)); $uri = $proto."://".$host.($port ? ":$port" : ""); $uri .= "/" if ($proto eq "ldap" || $proto eq "ldaps"); push(@uris, $uri); } @uris || &error($text{'server_euri'}); &save_directive($conf, "uri", join(" ", @uris)); } else { # Set host and port directives @hosts = split(/\s+/, $in{'host'}); foreach $h (@hosts) { &to_ipaddress($h) || &to_ip6address($h) || &error(&text('server_ehost', $h)); } @hosts || &error($text{'server_ehosts'}); &save_directive($conf, "host", join(" ", @hosts)); # Save server port if ($in{'port_def'}) { &save_directive($conf, "port", undef); } else { $in{'port'} =~ /^\d+$/ && $in{'port'} > 0 && $in{'port'} < 65536 || &error($text{'server_eport'}); &save_directive($conf, "port", $in{'port'}); } } # Save LDAP protocol version &save_directive($conf, "ldap_version", $in{'version'} || undef); # Save time limit if ($in{'timelimit_def'}) { &save_directive($conf, "bind_timelimit", undef); } else { $in{'timelimit'} =~ /^\d+$/ || &error($text{'server_etimelimit'}); &save_directive($conf, "bind_timelimit", $in{'timelimit'}); } # Save non-root login if ($in{'binddn_def'}) { &save_directive($conf, "binddn", undef); } else { $in{'binddn'} =~ /\S/ || &error($text{'server_ebinddn'}); &save_directive($conf, "binddn", $in{'binddn'}); } # Save non-root password if ($in{'bindpw_def'}) { &save_directive($conf, "bindpw", undef); } else { $in{'bindpw'} =~ /\S/ || &error($text{'server_ebindpw'}); &save_directive($conf, "bindpw", $in{'bindpw'}); } # Save root login my $rootdir = &find_svalue("rootpwmoddn", $conf, 2) ? "rootpwmoddn" : "rootbinddn"; if ($in{'rootbinddn_def'}) { &save_directive($conf, $rootdir, undef); } else { $in{'rootbinddn'} =~ /\S/ || &error($text{'server_erootbinddn'}); &save_directive($conf, $rootdir, $in{'rootbinddn'}); } # Save root password $in{'rootbindpw_def'} || $in{'rootbindpw'} =~ /\S/ || &error($text{'server_erootbindpw'}); if (&find_svalue("rootpwmoddn", $conf), 2) { # New format can put the password in the config file &save_directive($conf, "rootpwmodpw", $in{'rootbindpw_def'} ? undef : $in{'rootbindpw'}); } else { # Old format uses a separate secret file if ($in{'rootbindpw_def'}) { &save_rootbinddn_secret(undef); } else { &save_rootbinddn_secret($in{'rootbindpw'}); } } # SSL mode &save_directive($conf, "ssl", $in{'ssl'} || undef); # Check server SSL cert &save_directive($conf, "tls_checkpeer", $in{'peer'} || undef); # CA cert file for server if ($in{'cacert_def'}) { &save_directive($conf, "tls_cacertfile", undef); } else { $in{'cacert'} =~ /^\// && -r $in{'cacert'} && !-d $in{'cacert'} || &error($text{'server_ecacert'}); &save_directive($conf, "tls_cacertfile", $in{'cacert'}); } # Write out config &flush_file_lines(); &unlock_file(&get_ldap_config_file()); foreach $secret (@secrets) { &unlock_file($secret); } &webmin_log("server"); &redirect("");
Upload File
Create Folder