89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.43k stars 385 forks source link

[Error] distrobox enter fails if Username has "\" in name #1360

Closed AdaptiveThinking closed 2 months ago

AdaptiveThinking commented 2 months ago

Describe the bug Default Enter-Command fails if Username contains a Backslash "\", which is always the case if this is an ActiveDirectory (or LDAP)-Joined System.

Documentation of distrobox enter says it will execute "bash -l", but in reality it will try to use '... -c \"\\$(getent passwd ${USER}...' - which fails, because you have a Username of e.g. "AD\username".

distrobox enter will fail with "sh: 1: -l: not found", because "getent passwd ..." fails. It will show in the verbose mode: sh -c "\$(getent passwd Asername | cut -f 7 -d :) -l"

If you specify a Startup command with -- bash -l or -e bash -l, then this works as expected.

To Reproduce Use a Username like "AD\username".

Expected behavior Dont fail at the default command or let the default command be set.

Logs see above

Desktop (please complete the following information):

Additional context Runs in a virtual Desktop environment (Citrix) with Active Directory for Users.