mirror of
https://github.com/webmin/webmin.git
synced 2026-05-05 23:00:28 +01:00
Don't set userPassword if not needed https://sourceforge.net/tracker/index.php?func=detail&aid=3592714&group_id=17457&atid=117457#
This commit is contained in:
@@ -75,3 +75,5 @@ Added a field for editing the description for LDAP groups.
|
||||
The list of groups now includes descriptions, if any are set.
|
||||
---- Changes since 1.520 ----
|
||||
Added Module Config options for additional LDAP filters to find users and groups, in addition to the posixAccount / posixGroup object class filters.
|
||||
---- Changes since 1.610 ----
|
||||
The userPassword attribute is now removed for users or groups that don't have a password set.
|
||||
|
||||
@@ -360,7 +360,7 @@ else {
|
||||
"loginShell" => $shell,
|
||||
"homeDirectory" => $home,
|
||||
"gidNumber" => $gid,
|
||||
"userPassword" => $pass,
|
||||
$pass ? ( "userPassword" => $pass ) : ( ),
|
||||
"objectClass" => \@classes,
|
||||
@props );
|
||||
if (&indexoflc("person", @classes) >= 0 &&
|
||||
@@ -548,7 +548,7 @@ else {
|
||||
"loginShell" => $shell,
|
||||
"homeDirectory" => $home,
|
||||
"gidNumber" => $gid,
|
||||
"userPassword" => $pass,
|
||||
$pass ? ( "userPassword" => $pass ) : ( ),
|
||||
"objectClass" => \@classes,
|
||||
@props );
|
||||
if (&indexoflc("person", @classes) >= 0 &&
|
||||
@@ -556,6 +556,9 @@ else {
|
||||
# Person needs 'sn'
|
||||
$allprops{'sn'} = $real;
|
||||
}
|
||||
if (!$pass) {
|
||||
push(@rprops, "userPassword");
|
||||
}
|
||||
$rv = $ldap->modify($newdn, 'replace' => \%allprops,
|
||||
'delete' => \@rprops);
|
||||
if ($rv->code) {
|
||||
|
||||
Reference in New Issue
Block a user