|
|
|
@ -50,7 +50,8 @@ if ($active_server){
|
|
|
|
|
} else {
|
|
|
|
|
# Wyszukanie usera wg filtra
|
|
|
|
|
$PAR{'filter'} =~ s/\%login/$PAR{'user'}/;
|
|
|
|
|
my @search_args = (base => $PAR{'base'},
|
|
|
|
|
my @search_args = (
|
|
|
|
|
base => $PAR{'base'},
|
|
|
|
|
scope => 'sub',
|
|
|
|
|
filter => $PAR{'filter'},
|
|
|
|
|
attrs => ['1.1'],
|
|
|
|
@ -67,9 +68,7 @@ if ($active_server){
|
|
|
|
|
if ($result->code){
|
|
|
|
|
print $result->error;
|
|
|
|
|
} else {
|
|
|
|
|
$result = $ldap->set_password(
|
|
|
|
|
newpasswd => $PAR{'new_pass'},
|
|
|
|
|
);
|
|
|
|
|
$result = $ldap->set_password(newpasswd => $PAR{'new_pass'});
|
|
|
|
|
if ($result->code) {
|
|
|
|
|
print $result->error;
|
|
|
|
|
} else {
|
|
|
|
@ -80,7 +79,6 @@ if ($active_server){
|
|
|
|
|
print "User not found in LDAP\n" if $count == 0;
|
|
|
|
|
print "Found $count users\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$ldap->unbind();
|
|
|
|
|