Skip to content

Commit c8aad2d

Browse files
authored
Merge pull request #119 from brendandebeasi/fix/username-exact-match
2 parents 87379f4 + 155cbf4 commit c8aad2d

File tree

1 file changed

+1
-1
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-adduser

1 file changed

+1
-1
lines changed

root/etc/s6-overlay/s6-rc.d/init-adduser/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4-
if [[ ! -f "/usermod.done" ]] && [[ -n "${USER_NAME}" ]] && [[ "${USER_NAME}" != "abc" ]] && grep -q "^${USER_NAME}" /etc/passwd; then
4+
if [[ ! -f "/usermod.done" ]] && [[ -n "${USER_NAME}" ]] && [[ "${USER_NAME}" != "abc" ]] && grep -q "^${USER_NAME}:" /etc/passwd; then
55
echo "*** USER_NAME cannot be set to an user that already exists in /etc/passwd. Halting init. ***"
66
sleep infinity
77
else

0 commit comments

Comments
 (0)