aboutsummaryrefslogtreecommitdiff
path: root/util/mkrootfs
diff options
context:
space:
mode:
Diffstat (limited to 'util/mkrootfs')
-rwxr-xr-xutil/mkrootfs17
1 files changed, 7 insertions, 10 deletions
diff --git a/util/mkrootfs b/util/mkrootfs
index 5818fdb..91eff68 100755
--- a/util/mkrootfs
+++ b/util/mkrootfs
@@ -28,13 +28,10 @@ cp $CPFLAGS "$OVERLAY_FS/." .
# setuid busybox
chmod a=xrs,u+w bin/busybox
-# # create /etc/passwd
-# if ! [ -e etc/passwd ] ; then
-# # TODO: add root to a group
-# echo "root:x:0:0::/root:/bin/sh" > etc/passwd
-# fi
-# # and /etc/shadow
-# if ! [ -e etc/shadow ] ; then
-# echo "root:$(mkpasswd alpine):::::::" > etc/shadow
-# fi
-#
+# create a root user
+! [ -e etc/passwd ] && echo "root:x:0:0::/root:/bin/sh" > etc/passwd
+! [ -e etc/shadow ] && echo "root:!:0:0:99999:0:::" > etc/shadow
+! [ -e etc/group ] && echo "root:x:0:root" > etc/shadow
+
+# exit safely (continue makefile)
+exit 0