diff options
Diffstat (limited to 'filehooker/root-image')
4 files changed, 10 insertions, 7 deletions
diff --git a/filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service b/filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service new file mode 100644 index 00000000..45a9b4c8 --- /dev/null +++ b/filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service @@ -0,0 +1,2 @@ +[service] +ExecStartPre=/usr/bin/sleep 20 diff --git a/filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf b/filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf deleted file mode 100644 index 5c6618c5..00000000 --- a/filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -ExecStart= -#ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux diff --git a/filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service b/filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service new file mode 100644 index 00000000..45a9b4c8 --- /dev/null +++ b/filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service @@ -0,0 +1,2 @@ +[service] +ExecStartPre=/usr/bin/sleep 20 diff --git a/filehooker/root-image/root/customize_root_image.sh b/filehooker/root-image/root/customize_root_image.sh index 97f625ee..11912644 100755 --- a/filehooker/root-image/root/customize_root_image.sh +++ b/filehooker/root-image/root/customize_root_image.sh @@ -3,7 +3,7 @@ set -e -u -f -x reaktor_user=reaktor ncdc_user=hooker - +rootpw=$(dd if=/dev/urandom count=1 bs=128 | base64 -w0) sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen locale-gen @@ -46,13 +46,15 @@ test ! -e /krebs/painload/Reaktor && \ useradd $reaktor_user || : ## needed to see the hidden service hostname -echo "$reaktor_user ALL=(tor) NOPASSWD: /krebs/bin/tor-get-hidden-service.sh" >> /etc/sudoers.d/get_root - +echo "$reaktor_user ALL=(tor) NOPASSWD: /krebs/bin/tor-get-hidden-service.sh" >> /etc/sudoers.d/reaktor +echo "$reaktor_user ALL=(root) NOPASSWD: /krebs/bin/refresh-shares.ship" >> /etc/sudoers.d/reaktor +echo "$reaktor_user ALL=($ncdc_user) NOPASSWD: ALL" >> /etc/sudoers.d/reaktor +echo cp /krebs/painload/Reaktor/etc/systemd/system/Reaktor@.service \ /etc/systemd/system # add bonus features for filehooker cp -a /krebs/etc/Reaktor /krebs/painload - +(printf "%s\n%s\n" "$rootpw" "$rootpw" ) | passwd for i in multi-user.target \ pacman-init.service \ choose-mirror.service \ |