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

Cannot change group membership of toolbox user #632

Closed
mildred opened this issue Nov 24, 2020 · 4 comments
Closed

Cannot change group membership of toolbox user #632

mildred opened this issue Nov 24, 2020 · 4 comments
Labels
1. Bug Something isn't working

Comments

@mildred
Copy link

mildred commented Nov 24, 2020

Describe the bug

Trying to use rvm installed in multi-user mode inside the toolbox (so the rvm files do not clutter my home directory) I added myself to the rvm group, but when I enter the toolbox, I am not part of that group.

Steps how to reproduce the behaviour

  1. useradd -a -G nobody $USERNAME inside a toolbox
  2. close the toolbox, stop it then reopen it
  3. id | grep nobody inside the toolbox fails

Expected behaviour

The user inside the toolbox should be part of the group specified

Actual behaviour

The user is not part of the group

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

Toolbox package info (rpm -q toolbox)
toolbox-0.0.97-1.fc33.x86_64

Output of podman version
e.g.,

Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.15.2
Built:        Wed Oct  7 18:21:20 2020
OS/Arch:      linux/amd64

Podman package info (rpm -q podman)
podman-2.1.1-12.fc33.x86_64

Info about your OS
Fedora 33.20201124.0 (Silverblue)

Additional context
I think it might have worked before, but I'm not sure since I can't check because of https://discussion.fedoraproject.org/t/upgraded-sb-32-to-sb-33-old-toolboxes-dont-start/24630

@mildred mildred added the 1. Bug Something isn't working label Nov 24, 2020
@bnordgren
Copy link

I'm also having trouble figuring out my group membership within a toolbox.

On Fedora Silverblue 33 (Version: 33.20201119.0 (2020-11-19T01:07:33Z))

On the host, I've added the audio group and set /etc/security/limits.d/audio.conf to allow for realtime scheduling.

[bnordgren@mine ~]$ groups
bnordgren wheel audio
[bnordgren@mine ~]$ grep bnordgren /etc/group
wheel:x:10:bnordgren
bnordgren:x:1000:
audio:x:63:bnordgren

So on the host, the output of "groups" and the contents of /etc/group is consistent. But I made a toolbox where I did a dnf group install "Audio Production". Inside the toolbox I added myself to the audio and jackuser groups. But inside the toolbox, "groups" and /etc/group is not consistent; leaving me confused...

[bnordgren@mine security]$ toolbox enter audio
⬢[bnordgren@toolbox security]$ groups
bnordgren
⬢[bnordgren@toolbox security]$ grep bnordgren /etc/group
wheel:x:10:bnordgren
audio:x:63:bnordgren
bnordgren:x:1000:bnordgren
jackuser:x:994:bnordgren

What's really strange is that even though one method says I'm not a member of wheel, I can still sudo within the toolbox... ??!?

Leaving aside for the moment that installing the audio apps inside a toolbox may not work as well as layering all 200+ packages on top of the ostree image (meaning RT scheduling appears to not work), I'd like to know how to add myself to a group inside a toolbox as well.

@erindru
Copy link

erindru commented Jan 4, 2021

I'm having the same problem, except my usecase is trying to run the NordVPN client within a toolbox.

It requires the current user to be a member of the 'nordvpn' group in order to access the nordvpn socket, but I cant for the life of me figure out how to add my user to a group.

I would expect to be able to run usermod -aG and the exit / re-enter the toolbox and have the group take effect

@mildred
Copy link
Author

mildred commented Jun 7, 2021

It seems the container needs to stop before it can work.

@debarshiray
Copy link
Member

Duplicate of #1348

@debarshiray debarshiray marked this as a duplicate of #1348 Sep 28, 2023
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
Projects
None yet
Development

No branches or pull requests

4 participants