summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/root
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-26 01:40:51 +0100
committermakefu <github@syntax-fehler.de>2014-03-26 01:40:51 +0100
commit9d47cd69809bd54e2cfc939936532114e74766c5 (patch)
tree1c88faf2e740e923cfb1632bb59fbaef0a5cc004 /filehooker/root-image/root
parent49c538988bf1fb6d898866efb339c2b95e1a2920 (diff)
filehooker: add vsftp daemon
Diffstat (limited to 'filehooker/root-image/root')
-rwxr-xr-xfilehooker/root-image/root/customize_root_image.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/filehooker/root-image/root/customize_root_image.sh b/filehooker/root-image/root/customize_root_image.sh
index 11912644..ae1442a5 100755
--- a/filehooker/root-image/root/customize_root_image.sh
+++ b/filehooker/root-image/root/customize_root_image.sh
@@ -16,12 +16,13 @@ useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storag
mkdir -p /home/pimp/.ssh/ /root/.ssh/
cp /krebs/etc/authorized_keys /home/pimp/.ssh/
+cp /krebs/etc/vsftpd.conf /etc/
chown pimp -R /home/pimp/.ssh/
chmod 700 -R /home/pimp/.ssh/
cp /krebs/etc/authorized_keys /root/.ssh/
-useradd -m hooker ||:
+useradd -m $ncdc_user ||:
chown -R root:root /etc /root /krebs
chmod 750 /etc/sudoers.d
@@ -44,7 +45,7 @@ test ! -e /krebs/painload/Reaktor && \
tar xz -C "/krebs" && \
mv /krebs/painload-master /krebs/painload
-useradd $reaktor_user || :
+useradd -m $reaktor_user -s /krebs/bin/add-reaktor-secret.sh || :
## needed to see the hidden service hostname
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
@@ -55,6 +56,10 @@ cp /krebs/painload/Reaktor/etc/systemd/system/Reaktor@.service \
# add bonus features for filehooker
cp -a /krebs/etc/Reaktor /krebs/painload
(printf "%s\n%s\n" "$rootpw" "$rootpw" ) | passwd
+cd /krebs/painload/Reaktor/
+touch auth.lst admin.lst
+chown reaktor:reaktor auth.lst admin.lst
+
for i in multi-user.target \
pacman-init.service \
choose-mirror.service \
@@ -63,6 +68,7 @@ for i in multi-user.target \
filehooker-hostname.service \
start-ncdc@${ncdc_user}.service \
sshd.service \
+ vsftpd.service \
tor.service ;do
systemctl enable "$i"
done