mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03: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
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user