From be73c7abc4762807e7b36a70efdd0ac428c98c12 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 28 Feb 2018 00:32:21 +0100 Subject: Disable root password --- build_rootfs.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_rootfs.sh b/build_rootfs.sh index 2c1a7ce..5262f43 100755 --- a/build_rootfs.sh +++ b/build_rootfs.sh @@ -57,6 +57,10 @@ pack_squashfs() { mksquashfs $dir $dst_file } +disable_root() { + sed -i -e 's/^root::/root:*:/' $instroot/etc/shadow +} + add_file() { file=$1 src_dir=$2 @@ -118,6 +122,7 @@ install_packages() { } unpack +disable_root add_files $files_dir $instroot if test -n "$files"; then add_files $files $instroot -- cgit v1.2.3