mirror of https://github.com/dirtbags/moth.git
resolve packages passwd conflicts
This commit is contained in:
parent
114172035c
commit
1303ae6a5b
|
@ -1,3 +0,0 @@
|
||||||
root:$1$bEGCYemG$pAo9KXWQKgQNijRGKSb7e1:0:0:root:/:/bin/ash
|
|
||||||
ctf:x:100:100:CTF Services:/:/bin/false
|
|
||||||
nobody:x:65534:65534:nobody:/:/bin/false
|
|
|
@ -3,15 +3,13 @@
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
# Make user accounts
|
# Make user accounts
|
||||||
if ! [ -r /etc/passwd ]; then
|
adduser -D -u 0 -h /var root || true
|
||||||
cat passwd >/etc/passwd
|
adduser -D -u 100 -h /tmp -g 'CTF Services' ctf || true
|
||||||
fi
|
adduser -D -u 65534 -h / nobody || true
|
||||||
|
echo 'root:$1$bEGCYemG$pAo9KXWQKgQNijRGKSb7e1' | chpasswd --encrypted
|
||||||
|
|
||||||
# Set up networking for all CTF ips
|
# Set up networking for all CTF ips
|
||||||
ip link set eth0 up
|
ip link set eth0 up
|
||||||
if ! ip route | grep -q default; then
|
|
||||||
ip route add default via fd82:b410:3441:1661::1 || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
install -o root -m 0755 -d /var/lib/ctf/tokens
|
install -o root -m 0755 -d /var/lib/ctf/tokens
|
||||||
exec ./ctfd
|
exec ./ctfd
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
root:$1$xAJ7KwiU$BeKJjYGs9r/hY9Ag4qv4I1:0:0:root:/:/bin/sh
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
cat passwd > /etc/passwd
|
if adduser -D -u 0 -h / -s /bin/sh root; then
|
||||||
|
echo 'root:$1$xAJ7KwiU$BeKJjYGs9r/hY9Ag4qv4I1' | chpasswd --encrypted
|
||||||
|
done
|
||||||
|
|
||||||
exec dropbear -r ./rsa.key -E -F
|
exec dropbear -r ./rsa.key -E -F
|
||||||
|
|
Loading…
Reference in New Issue