fix 4513 enable root logon permission in remoteshell,4522 support remove os pkgs in ubuntu pkg list
This commit is contained in:
parent
ebee9deebe
commit
6a703f9ea7
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user