mirror of https://github.com/dirtbags/moth.git
Fix root account creation race condition
This commit is contained in:
parent
3bd320aa32
commit
46147ee5df
|
@ -2,9 +2,6 @@
|
|||
|
||||
exec 2>&1
|
||||
|
||||
[ -r /etc/passwd ] || echo 'root:x:0:0:root:/tmp:/bin/sh' > /etc/passwd
|
||||
|
||||
# Always do this, in case something else set a root password
|
||||
echo 'root:$1$i/EeZyl6$5C6Z8s0ftEdTKFLUli1wP1' | chpasswd --encrypted
|
||||
|
||||
# Bring up the NIC; this will get us at least a link-local address, and
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
exec 2>&1
|
||||
|
||||
cd /var/www
|
||||
|
||||
ln -sf /var/www default
|
||||
exec tcpsvd -l localhost 0 80 /opt/inferno/bin/eris -d
|
||||
|
||||
|
|
|
@ -18,5 +18,5 @@ for d in /opt/*; do
|
|||
fi
|
||||
done
|
||||
|
||||
cd /var/www
|
||||
ln -sf /var/www default
|
||||
exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/eris -c
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
exec 2>&1
|
||||
|
||||
echo 'root:$1$xAJ7KwiU$BeKJjYGs9r/hY9Ag4qv4I1:0:0:root:/tmp:/bin/sh' > /etc/passwd
|
||||
echo 'root:$1$xAJ7KwiU$BeKJjYGs9r/hY9Ag4qv4I1:0:0' | chpasswd --encrypted
|
||||
|
||||
exec dropbear -r ./rsa.key -E -F
|
||||
|
|
Loading…
Reference in New Issue