From a275253155bde7969272311efe124420da152aa0 Mon Sep 17 00:00:00 2001
From: Steffen Pankratz <kratz00@gmx.de>
Date: Fri, 11 Dec 2015 22:23:06 +0100
Subject: [PATCH] - fix shadow password support

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reveiwed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
---
 bsp/default/root_file_system/etc/passwd | 3 ---
 build_patches/set_root_password.patch   | 8 ++++++++
 buildscript                             | 3 +++
 3 files changed, 11 insertions(+), 3 deletions(-)
 delete mode 100644 bsp/default/root_file_system/etc/passwd
 create mode 100644 build_patches/set_root_password.patch

diff --git a/bsp/default/root_file_system/etc/passwd b/bsp/default/root_file_system/etc/passwd
deleted file mode 100644
index 3a7ff4ac..00000000
--- a/bsp/default/root_file_system/etc/passwd
+++ /dev/null
@@ -1,3 +0,0 @@
-root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:root:/root:/bin/ash
-nobody:*:65534:65534:nobody:/var:/bin/false
-daemon:*:65534:65534:daemon:/var:/bin/false
\ No newline at end of file
diff --git a/build_patches/set_root_password.patch b/build_patches/set_root_password.patch
new file mode 100644
index 00000000..05a1be0f
--- /dev/null
+++ b/build_patches/set_root_password.patch
@@ -0,0 +1,8 @@
+--- package/base-files/files/etc/shadow
++++ package/base-files/files/etc/shadow
+@@ -1,4 +1,4 @@
+-root::0:0:99999:7:::
++root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
+ daemon:*:0:0:99999:7:::
+ ftp:*:0:0:99999:7:::
+ network:*:0:0:99999:7:::
diff --git a/buildscript b/buildscript
index d103a69f..6aea082a 100755
--- a/buildscript
+++ b/buildscript
@@ -159,6 +159,9 @@ prepare() {
     # This changes the default behavior of sysupgrade to not save the config 
     patch -p0 -d "$target" -i "$PWD"/build_patches/sysupgrade_no_config_save.patch
 
+    # set default password to 'ffol'
+    patch -p0 -d "$target" -i "$PWD"/build_patches/set_root_password.patch
+
     #saves ~200MB for each build
     test -d ./src/dl || mkdir ./src/dl
     ln -s ../../src/dl "$target"/dl
-- 
GitLab