modify password for USERID failed, need update password for SNMPv3.1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11924 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d27ef5117f
commit
e7cf5580d0
@ -4236,8 +4236,8 @@ sub passwd {
|
||||
if (!grep(/OK/i, @data)) {
|
||||
return ([1, @data]);
|
||||
}
|
||||
$mpatab->setAttribs({mpa=>$mpa,username=>$user},{password=>$pass});
|
||||
if ($user eq "HMC") {
|
||||
$mpatab->setAttribs({mpa=>$mpa,username=>$user},{password=>$pass});
|
||||
my $fsp_api = ($::XCATROOT) ? "$::XCATROOT/sbin/fsp-api" : "/opt/xcat/sbin/fsp-api";
|
||||
my $blades = &get_blades_for_mpa($mpa);
|
||||
if (!defined($blades)) {
|
||||
@ -4267,6 +4267,14 @@ sub passwd {
|
||||
my $fblades = join (',',@failed_blades);
|
||||
return ([1, "Update password of HMC for '$fblades' failed. Please recreate the DFM connections for them."]);
|
||||
}
|
||||
} else {
|
||||
@data = ();
|
||||
my $snmp_cmd = "users -n $user -ap sha -pp des -ppw $pass -T system:$mm";
|
||||
@data = $t->cmd($snmp_cmd);
|
||||
if (!grep(/OK/i, @data)) {
|
||||
return ([1, @data]);
|
||||
}
|
||||
$mpatab->setAttribs({mpa=>$mpa,username=>$user},{password=>$pass});
|
||||
}
|
||||
} else {
|
||||
return ([1, "Update password for $user in 'mpa' table failed"]);
|
||||
|
Loading…
Reference in New Issue
Block a user