mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
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