From d401f59d7f865d58e261d03e47bf0c2f276189eb Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 10 Apr 2012 05:27:21 +0000 Subject: [PATCH] fix bug 3515394: rspconfig passwd for cmm error git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12171 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 0f97bfd19..e47b4889b 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -4282,6 +4282,12 @@ sub passwd { 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)) { + $cmd = "users -n $user -op $pass -p $oldpass -T system:$mm"; + my @back_pwd = $t->cmd($cmd); + if (!grep(/OK/i, @back_pwd)) { + #if we update password backward failed, we should update the mpa table for further use# + $mpatab->setAttribs({mpa=>$mpa,username=>$user},{password=>$pass}); + } return ([1, @data]); } $mpatab->setAttribs({mpa=>$mpa,username=>$user},{password=>$pass});