summaryrefslogtreecommitdiffstats
path: root/elchos/root-image/root
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-04-02 13:01:24 +0200
committermakefu <github@syntax-fehler.de>2014-04-02 13:01:24 +0200
commitfe564a5ab91d967441748048513b361e4fce1157 (patch)
tree37be25ac7d92971809f7797197f318f9ae5eb14a /elchos/root-image/root
parent732876299f4dccb4caa3a915879d2b5945bbdd42 (diff)
set random root password
Diffstat (limited to 'elchos/root-image/root')
-rwxr-xr-xelchos/root-image/root/customize_root_image.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/elchos/root-image/root/customize_root_image.sh b/elchos/root-image/root/customize_root_image.sh
index ffad251e..ca6a21dd 100755
--- a/elchos/root-image/root/customize_root_image.sh
+++ b/elchos/root-image/root/customize_root_image.sh
@@ -3,7 +3,7 @@
set -e -u -f -x
reaktor_user=reaktor
ncdc_user=hooker
-rootpw=zahlen8ZaiFe
+rootpw=$(dd if=/dev/urandom bs=1 count=100 2>/dev/null |md5sum | awk '{print $1}' | dd bs=1 count=9 2>/dev/null)
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
locale-gen
@@ -58,10 +58,8 @@ cp /krebs/painload/Reaktor/etc/systemd/system/Reaktor@.service \
# add bonus features for elch
cp -a /krebs/etc/Reaktor /krebs/painload
# emergency root passwd
+echo "the Root PW is $rootpw"
(printf "%s\n%s\n" "$rootpw" "$rootpw" ) | passwd
-#sed -i \
-# 's#^root.*#root:$6$OrW0nWn4$w0DYuPz96VYLIEBgRtjjn01Y4lHu/FbbXuZeCqHo81YsYe/IMGxPmLLpPw10JlmA3amemet4VfV6/FSlOxpeK0:16161:15593::::::#' \
-# /etc/shadow
cd /krebs/painload/Reaktor/
touch auth.lst admin.lst
chown reaktor:reaktor auth.lst admin.lst