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

Rework containers to create the current user dynamically instead of using canned /etc/passwd and /etc/group #1403

Closed
rfay opened this issue Jan 26, 2019 · 2 comments
Labels
Prioritized We expect to do this in an upcoming release

Comments

@rfay
Copy link
Member

rfay commented Jan 26, 2019

In our containers we use a canned /etc/passwd and /etc/group, just so every user (but only below id 60000) can have a name and be looked up.

We'd be a lot better to actually create the user user useradd or the like on login, then use the actual id. That would allow us to use high windows and mac uids without strain. And it would leave room in the container for when people add a package that creates a user.

So:

  • Use default /etc/passwd and /etc/group
  • Dynamically create user on container startup, with same name and id and primary group and the host user.
@rfay rfay added the Prioritized We expect to do this in an upcoming release label Apr 3, 2019
@rfay rfay changed the title Rework containers to create the current user dynamically instead of using canned /etc/passwd Rework containers to create the current user dynamically instead of using canned /etc/passwd and /etc/group Apr 3, 2019
@rfay
Copy link
Member Author

rfay commented May 21, 2019

I took a look at this today and was unable to use either sudo or su to create an arbitrary user when working from a user with no name.

Options:

  • Use "build" to build in the right user. This would be lovely, but would mean that build was always used.
  • Add an extra stage where a root exec happened to set up the user.

@rfay
Copy link
Member Author

rfay commented Jul 19, 2019

Fixed in #1688

@rfay rfay closed this as completed Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prioritized We expect to do this in an upcoming release
Projects
None yet
Development

No branches or pull requests

1 participant