mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-24 05:11:12 +00:00
fix 4513 enable root logon permission in remoteshell,4522 support remove os pkgs in ubuntu pkg list
This commit is contained in:
@@ -136,7 +136,7 @@ sub subvars {
|
||||
# append preseed directive lines
|
||||
while (<PKGLISTFILE>) {
|
||||
chomp $_;
|
||||
if (/^\s*#.*/ ){
|
||||
if ((/^\s*#.*/ ) || ( $_ =~ /^-/ )){
|
||||
next;
|
||||
}
|
||||
$pkglist .= " " . $_;
|
||||
|
@@ -55,10 +55,13 @@ then
|
||||
sed -i '/MaxStartups /'d /etc/ssh/sshd_config
|
||||
echo "MaxStartups 1024" >>/etc/ssh/sshd_config
|
||||
|
||||
if [ "$SETUPFORPCM" = "1" ];then
|
||||
sed -i '/PasswordAuthentication /'d /etc/ssh/sshd_config
|
||||
echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
|
||||
|
||||
if [ "$SETUPFORPCM" = "1" ]; then
|
||||
if [[ $OSVER == sles* ]];then
|
||||
sed -i '/PasswordAuthentication /'d /etc/ssh/sshd_config
|
||||
echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
|
||||
elif [[ $OSVER == ubuntu* ]];then
|
||||
sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user