Explorar el Código

Disable root log in without password

Co-Authored-By: Jakub Jirutka <jakub@jirutka.cz>
Derek McEachern hace 3 años
padre
commit
79cac5edcf
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      alpine-make-rootfs

+ 3 - 0
alpine-make-rootfs

@@ -399,6 +399,9 @@ if ! [ -f "$rootfs"/etc/alpine-release ]; then
 	fi
 fi
 
+# Disable root log in without password.
+sed -i 's/^root::/root:*:/' "$rootfs"/etc/shadow
+
 [ -e "$rootfs"/var/run ] || ln -s /run "$rootfs"/var/run
 
 #-----------------------------------------------------------------------