[ Avaa Bypassed ]




Upload:

Command:

www-data@160.79.109.87: ~ $
#!/usr/bin/perl
# Check the user's LDAP settings

require './ldap-client-lib.pl';
require './switch-lib.pl';
&ui_print_unbuffered_header(undef, $text{'check_title'}, "");

# Get the user base
print $text{'check_base'},"<br>\n";
$conf = &get_config();

@bases = &find_value("base", $conf);
@scopes = &find_value("scope", $conf);

if (&get_ldap_client() eq "nss") {
	# Older LDAP config uses directives like nss_base_passwd, with
	# the scope and filter separated by ?
	$user_base = &find_svalue("nss_base_passwd", $conf) ||
		     &find_svalue("base", $conf);
	}
else {
	# Newer LDAP versions have a base starting with 'user', but fall back
	# to the one with no DB
	($user_base) = map { /^\S+\s+(\S+=*)/; $1 }
		           grep { /^passwd\s/ } @bases;
	if (!$user_base) {
		($user_base) = grep { /^\S+=.*$/ } @bases;
		}
	}
if (!$user_base) {
	&print_problem(&text('check_ebase'));
	goto END;
	}
else {
	print &text('check_based', "<tt>$user_base</tt>"),"<p>\n";
	}

# Attempt to connect to LDAP server
print $text{'check_connect'},"<br>\n";
$ldap = &ldap_connect(1);
if (!ref($ldap)) {
	&print_problem(&text('check_econnect', $ldap));
	goto END;
	}
else {
	local $ldaphost;
	eval { $ldaphost = $ldap->host(); };
	$ldaphost ||= &get_ldap_host();
	print &text('check_connected', $ldaphost),"<p>\n";
	}

# Work out the scope
if (&get_ldap_client() eq "nss") {
	$scope = &find_svalue("scope", $conf);
	}
else {
	($scope) = grep { /^\S+$/ } @scopes;
	}
if ($user_base =~ s/\?([^\?]*)(\?([^\?]*))?$//) {
	$scope = $1;
	}
$scope ||= "one";

# Look for some users
print $text{'check_search'},"<br>\n";
$rv = $ldap->search(base => $user_base,
		    filter => '(objectClass=posixAccount)',
		    scope => $scope);
if ($rv->code) {
	# Search failed!
	&print_problem(&text('check_esearch', $rv->error));
	goto END;
	}
if (!$rv->count) {
	&print_problem(&text('check_eusers', "<tt>$user_base</tt>"));
	goto END;
	}
else {
	print &text('check_found', $rv->count),"<p>\n";
	}

# Check NSS configuration for users
print $text{'check_nss'},"<br>\n";
$nss = &get_nsswitch_config();
($passwd) = grep { $_->{'name'} eq 'passwd' } @$nss;
($ldapsrc) = grep { $_->{'src'} eq 'ldap' ||
		    $_->{'src'} eq 'sss' } @{$passwd->{'srcs'}};
if (!$ldapsrc) {
	&print_problem($text{'check_enss'});
	goto END;
	}
else {
	print $text{'check_nssok'},"<p>\n";
	}

# Make sure one of the users is a valid Unix user
$first = $rv->entry(0);
print &text('check_match', "<tt>".$first->get_value("uid")."</tt>"),"<br>\n";
$uid = getpwnam($first->get_value("uid"));
if (!$uid) {
	# Sometimes this fails due to nsswitch.conf caching .. so try forking
	# a separate command
	$uid = &backquote_command(
		"id -a ".$first->get_value("uid")." 2>/dev/null");
	}
if (!$uid) {
	&print_problem($text{'check_ematch'});
	goto END;
	}
else {
	print $text{'check_matched'},"<p>\n";

	print "<b>$text{'check_done'}</b><p>\n";
	}

END:
&ui_print_footer("", $text{'index_return'});

sub print_problem
{
print "<font color=#ff0000>",@_,"</font><p>\n";
}

Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 1.1 KB 0644
atboot.cgi File 483 B 0755
browser.cgi File 2.29 KB 0755
check.cgi File 2.93 KB 0755
config-ALL-linux File 79 B 0644
config-AlmaLinux-6.0-ALL File 66 B 0644
config-CentOS-Linux-6.0-ALL File 66 B 0644
config-CentOS-Stream-Linux-8.0-ALL File 66 B 0644
config-CloudLinux-8.0-ALL File 66 B 0644
config-Oracle-Linux-8.0-ALL File 66 B 0644
config-Redhat-Enterprise-Linux-6.0-ALL File 66 B 0644
config-Rocky-Linux-6.0-ALL File 66 B 0644
config-Scientific-Linux-6.0-ALL File 66 B 0644
config-debian-linux-3.1 File 100 B 0644
config-debian-linux-4.0-5.9 File 65 B 0644
config-debian-linux-6.0-6.9 File 128 B 0644
config-debian-linux-7.0-ALL File 65 B 0644
config-pardus-linux File 74 B 0644
config-redhat-linux-13.0-ALL File 89 B 0644
config.info File 556 B 0644
config.info.ca File 732 B 0644
config.info.de File 593 B 0644
config.info.nl File 473 B 0644
config.info.no File 528 B 0644
config.info.pt_BR File 599 B 0644
cpan_modules.pl File 82 B 0755
edit_base.cgi File 2.47 KB 0755
edit_pam.cgi File 1.36 KB 0755
edit_server.cgi File 3.27 KB 0755
edit_switch.cgi File 1.74 KB 0755
fixpam.cgi File 364 B 0755
index.cgi File 2.36 KB 0755
install_check.pl File 334 B 0755
ldap-client-lib.pl File 11.53 KB 0755
list_switches.cgi File 772 B 0755
log_parser.pl File 461 B 0755
module.info File 158 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 96 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 122 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 144 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 161 B 0644
module.info.ca File 97 B 0644
module.info.cs File 0 B 0644
module.info.cs.auto File 105 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 97 B 0644
module.info.de File 99 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 148 B 0644
module.info.es File 0 B 0644
module.info.es.auto File 99 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 106 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 159 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 110 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 120 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 126 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 99 B 0644
module.info.hu File 0 B 0644
module.info.hu.auto File 117 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 95 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 144 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 128 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 108 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 99 B 0644
module.info.ms File 103 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 107 B 0644
module.info.nl File 20 B 0644
module.info.nl.auto File 83 B 0644
module.info.no File 20 B 0644
module.info.no.auto File 80 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 95 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 101 B 0644
module.info.pt_BR File 24 B 0644
module.info.pt_BR.auto File 83 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 105 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 170 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 108 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 102 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 104 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 204 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 123 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 146 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 189 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 145 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 84 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 90 B 0644
popup_browser.cgi File 2.73 KB 0755
restart.cgi File 329 B 0755
save_base.cgi File 1.86 KB 0755
save_pam.cgi File 1.31 KB 0755
save_server.cgi File 3.53 KB 0755
save_switch.cgi File 932 B 0755
start.cgi File 282 B 0755
stop.cgi File 254 B 0755
switch-lib.pl File 3.08 KB 0755