mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-14 15:58:38 -05:00
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:
@@ -2,6 +2,7 @@
|
|||||||
set +x
|
set +x
|
||||||
|
|
||||||
if [ `id -u` -ge 500 ] || [ -z "${CURRENT_UID}" ]; then
|
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
|
echo "awx:x:`id -u`:`id -g`:,,,:/tmp:/bin/bash" >> /tmp/passwd
|
||||||
cat /tmp/passwd > /etc/passwd
|
cat /tmp/passwd > /etc/passwd
|
||||||
rm /tmp/passwd
|
rm /tmp/passwd
|
||||||
|
|||||||
Reference in New Issue
Block a user