moth/packages/ctfbase/service/ctfd/run

16 lines
367 B
Bash
Executable File

#! /bin/sh -e
exec 2>&1
# Make user accounts
adduser -D -u 0 -h /var root || true
adduser -D -u 100 -h /tmp -g 'CTF Services' ctf || true
adduser -D -u 65534 -h / nobody || true
echo 'root:$1$bEGCYemG$pAo9KXWQKgQNijRGKSb7e1' | chpasswd --encrypted
# Set up networking for all CTF ips
ip link set eth0 up
install -o root -m 0755 -d /var/lib/ctf/tokens
exec ./ctfd