Skip to content

Commit 10c00f6

Browse files
sbouchetRomanNikitenko
authored andcommitted
CRW-9947: reverting script modifications of etc/passwd
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
1 parent 08d7649 commit 10c00f6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

build/scripts/entrypoint-volume.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ get_openssl_version() {
5858
fi
5959
}
6060

61+
# UDI8 support for adding current (arbitrary) user to /etc/passwd and /etc/group
62+
if ! whoami &> /dev/null; then
63+
if [ -w /etc/passwd ]; then
64+
echo "${USER_NAME:-user}:x:$(id -u):0:${USER_NAME:-user} user:${HOME}:/bin/bash" >> /etc/passwd
65+
echo "${USER_NAME:-user}:x:$(id -u):" >> /etc/group
66+
fi
67+
fi
68+
6169
# list checode
6270
ls -la /checode/
6371

0 commit comments

Comments
 (0)