Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start container if user is managed by Active Directory (contains @ "at" sign) #1022

Closed
Mazwak opened this issue Mar 14, 2022 · 4 comments
Labels
1. Bug Something isn't working 2. Container Configuration Configuration of a container. Mounts, environmental variables, privileges. 2. Container Realm The issue is related to what happens inside of a toolbox container 5. Help Wanted Extra attention is needed

Comments

@Mazwak
Copy link

Mazwak commented Mar 14, 2022

Describe the bug

If I try to enter a toolbox and my username contains '@', it fails with:
Error: invalid entry point PID of container test

If I try to attach with podman, the error is more obvious:
passwd: Libuser error at line: 210 - name contains invalid char `@'.
Error: failed to remove password for user [email protected]: failed to invoke passwd(1)

Steps how to reproduce the behaviour
Create a user with '@' in it.
toolbox create test
toolbox enter test

Expected behaviour
Entering the toolbox without error, at best.
Failing with a usefull message, at least.

Actual behaviour
Fails with a useless message.
I agree with #691 (comment) that debug info did not help at all.
Only trying with podman, after reading #691 (comment) did help.

Output of toolbox --version (v0.0.90+)

toolbox version 0.0.99.3

Toolbox package info (rpm -q toolbox)

toolbox-0.0.99.3-2.fc35.x86_64

Output of podman version
e.g.,

Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.16.8
Built:        Wed Dec  8 22:45:07 2021
OS/Arch:      linux/amd64

Podman package info (rpm -q podman)

podman-3.4.4-1.fc35.x86_64

Info about your OS
Fedora Silverblue 35

Additional context

My user is imported from ActiveDirectory, and thus is [email protected].

@Mazwak Mazwak added the 1. Bug Something isn't working label Mar 14, 2022
@HarryMichal HarryMichal changed the title Unable to start container if user contains @ (at sign) Unable to start container if user is managed by Active Directory (contains @ "at" sign) Mar 20, 2022
@HarryMichal HarryMichal added 5. Help Wanted Extra attention is needed 2. Container Realm The issue is related to what happens inside of a toolbox container 2. Container Configuration Configuration of a container. Mounts, environmental variables, privileges. labels Mar 20, 2022
@yrro
Copy link

yrro commented Nov 17, 2022

The problem is really the usermod command. I can toolbox enter debian-10 just fine, which ships shadow-utils 4.5; but toolbox-enter centos-stream8, which ships shadow-utils 4.6, gives me this error. Additionally I've noticed in the man page that usernames are limited to 32 characters, which is way too short for many users in an Active Directory environment!

But Toolbox can't do anything to fix the usermod command in dozens of old versions of distros. So what else could it do; detecting that useradd has failed, and re-running it with a modified username that is known to be accepted by usermod would be one approach.

@debarshiray
Copy link
Member

Duplicate of #585

@debarshiray
Copy link
Member

Closing. Thanks for your interest in Toolbx and digging into this!

@yrro
Copy link

yrro commented Nov 29, 2022

Thanks. Apologies for not finding the duplicate issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug Something isn't working 2. Container Configuration Configuration of a container. Mounts, environmental variables, privileges. 2. Container Realm The issue is related to what happens inside of a toolbox container 5. Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants