diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index e50dcfc6b..8e9b772e8 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1300,12 +1300,18 @@ sub becomeuser { return undef; } $passent=$passent->{password}; - if ($passent =~ /^\$(2a|1)\$.*\$/) { #MD5 or Blowfish hash, calculate before comparison - $pass = crypt($pass,$passent); - } #Not bothering with old DES method, for now assume plaintext if not set - if ($pass eq $passent) { + my $encryptedpass = crypt($pass,$passent); + if ($encryptedpass eq $passent) { + return $id; + }elsif ($pass eq $passent) { return $id; } +# if ($passent =~ /^\$(2a|1)\$.*\$/) { #MD5 or Blowfish hash, calculate before comparison +# $pass = crypt($pass,$passent); +# } #Not bothering with old DES method, for now assume plaintext if not set +# if ($pass eq $passent) { +# return $id; +# } #If here, unable to validate given credential return undef; }