Ensure that a root user is always present in development environment

@AlanCoding was seeing errors in the development container when trying to run some commands as root. This fixes that.
This commit is contained in:
Shane McDonald
2019-05-10 09:14:59 -04:00
parent 2910a9dfff
commit 015234287c

View File

@@ -2,6 +2,7 @@
set +x
if [ `id -u` -ge 500 ] || [ -z "${CURRENT_UID}" ]; then
echo "root:x:0:0:root:/root:/bin/bash" > /tmp/password
echo "awx:x:`id -u`:`id -g`:,,,:/tmp:/bin/bash" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd