Skip to content

Commit

Permalink
init: use different check for user existence (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
89luca89 authored Jan 1, 2022
1 parent bbd4051 commit 8c5b00e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distrobox-init
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ if ! grep -q "${container_user_name}" /etc/group; then
groupadd --force --gid "${container_user_gid}" "${container_user_name}"
fi
# Let's add our user to the container if the user already exists, just go ahead.
if ! id "${container_user_name}"; then
if ! grep -q "${container_user_name}" /etc/passwd; then
if ! useradd \
--home-dir "${container_user_home}" \
--no-create-home \
Expand Down

0 comments on commit 8c5b00e

Please sign in to comment.