diff --git a/distrobox-enter b/distrobox-enter index 14aaeb23..4f49b33a 100755 --- a/distrobox-enter +++ b/distrobox-enter @@ -79,7 +79,8 @@ fi # Defaults container_command="" # by default we use getent to get the login shell of the user and use that -container_command_login="/bin/sh -c \"\\\$(getent passwd ${USER} | cut -f 7 -d :) -l\"" +container_command_user="$(echo "${USER}" | sed 's|\\|\\\\|g')" +container_command_login="/bin/sh -c \"\\\$(getent passwd ${container_command_user} | cut -f 7 -d :) -l\"" container_image_default="registry.fedoraproject.org/fedora-toolbox:39" container_manager="autodetect" container_manager_additional_flags=""