Permit root login #3

This commit is contained in:
Bohan Yang
2020-09-23 15:58:57 +08:00
parent 874103f467
commit 804fe9b9fc
+7
View File
@@ -433,6 +433,13 @@ if [ -n "$DEBI_KERNEL_PARAMS" ]; then
echo "d-i debian-installer/add-kernel-opts string$DEBI_KERNEL_PARAMS" | $save_preseed
fi
if [ "$DEBI_USERNAME" = root ]; then
$save_preseed << 'EOF'
d-i preseed/late_command string \
in-target sed -ri 's/^#?PermitRootLogin .+/PermitRootLogin yes/' /etc/ssh/sshd_config
EOF
fi
$save_preseed << EOF
# Finishing up the installation