Fix root account creation race condition

This commit is contained in:
Neale Pickett 2012-05-11 11:15:42 -06:00
parent 62c508aa07
commit af1c79dcf6
4 changed files with 3 additions and 7 deletions

View File

@ -2,9 +2,6 @@
exec 2>&1 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 echo 'root:$1$i/EeZyl6$5C6Z8s0ftEdTKFLUli1wP1' | chpasswd --encrypted
# Bring up the NIC; this will get us at least a link-local address, and # Bring up the NIC; this will get us at least a link-local address, and

View File

@ -2,7 +2,6 @@
exec 2>&1 exec 2>&1
cd /var/www ln -sf /var/www default
exec tcpsvd -l localhost 0 80 /opt/inferno/bin/eris -d exec tcpsvd -l localhost 0 80 /opt/inferno/bin/eris -d

View File

@ -18,5 +18,5 @@ for d in /opt/*; do
fi fi
done done
cd /var/www ln -sf /var/www default
exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/eris -c exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/eris -c

View File

@ -2,6 +2,6 @@
exec 2>&1 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 exec dropbear -r ./rsa.key -E -F