Add root password for AIX nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2853 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
0f50081b3a
commit
536944b903
@ -198,6 +198,27 @@ sub makescript {
|
||||
push @scriptd, "export SVLOGLOCAL\n";
|
||||
}
|
||||
|
||||
# add the root passwd, if any, for AIX nodes
|
||||
# get it from the system/root entry in the passwd table
|
||||
# !!!!! it must be an unencrypted value for AIX!!!!
|
||||
# - user will have to reset if this is a security issue
|
||||
$os =~ s/\s*$//;
|
||||
$os =~ tr/A-Z/a-z/; # Convert to lowercase
|
||||
if ($os eq "aix") {
|
||||
my $passwdtab = xCAT::Table->new('passwd');
|
||||
unless ( $passwdtab) {
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "Unable to open passwd table.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
|
||||
my $et = $passwdtab->getAttribs({key => 'system', username => 'root'}, 'password');
|
||||
if ($et and defined ($et->{'password'})) {
|
||||
push @scriptd, "ROOTPW=".$et->{'password'}."\n";
|
||||
push @scriptd, "export ROOTPW\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$nodesetstate) { $nodesetstate=getnodesetstate($node);}
|
||||
push @scriptd, "NODESETSTATE=".$nodesetstate."\n";
|
||||
push @scriptd, "export NODESETSTATE\n";
|
||||
|
Loading…
Reference in New Issue
Block a user