From 2a9414124f0c641e2588e874aaa395156efa3acc Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Fri, 9 Mar 2012 01:57:25 +0000 Subject: [PATCH] fix bugs about rspconfig cmm USERID= git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11799 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 4de400a80..e95e11747 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -4224,19 +4224,19 @@ sub passwd { my $user = shift; my $pass = shift; my $mm = shift; - my $cmd = "users -n $user -p $pass -T system:$mm"; if (!$pass) { return ([1, "No param specified for '$user'"]); } - my @data = $t->cmd($cmd); - if (!grep(/OK/i, @data)) { - return ([1, @data]); - } my $mpatab = xCAT::Table->new('mpa'); if ($mpatab) { my ($ent)=$mpatab->getNodeSpecAttribs($mpa, {username=>$user},qw(password)); my $oldpass = 'PASSW0RD'; if (defined($ent->{password})) {$oldpass = $ent->{password}}; + my $cmd = "users -n $user -op $oldpass -p $pass -T system:$mm"; + my @data = $t->cmd($cmd); + if (!grep(/OK/i, @data)) { + return ([1, @data]); + } $mpatab->setAttribs({mpa=>$mpa,username=>$user},{password=>$pass}); if ($user eq "HMC") { my $fsp_api = ($::XCATROOT) ? "$::XCATROOT/sbin/fsp-api" : "/opt/xcat/sbin/fsp-api";