Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

docs: Add users and groups #108

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

cgwalters
Copy link
Member

Since this is a complex tricky topic.

@cgwalters cgwalters force-pushed the doc-user-groups branch 2 times, most recently from de38b63 to 0d1a335 Compare December 13, 2023 21:23
Copy link
Collaborator

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cgwalters
Copy link
Member Author

OK so this doc only change is now hitting the same bits in #107 (comment)
Bizarre...will dig into this

@cgwalters
Copy link
Member Author

@lmilbaum
Copy link
Contributor

Not a blocker, would it make sense to provide code samples?

Copy link
Collaborator

@sallyom sallyom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(Even better, if this is for code executed as part of a systemd unit, investigate
using `DynamicUser=yes`)

However, `sysusers.d` only works for "system" users, not human login users.
Copy link

@runcom runcom Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really true? 🤔 I can set a shell via sysusers.d and have a fully capable user (for kiosk for instance, but I think I can login too just fine)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the man page has

This tool may be used to allocate system users and groups only, it is not useful for creating non-system (i.e. regular, "human") users and groups, as it accesses
/etc/passwd and /etc/group directly, bypassing any more complex user databases, for example any database involving NIS or LDAP.

But I think you're right it can be coaxed into doing the allocation part; there was also a discussion on fedora devel about extending this.

@runcom
Copy link

runcom commented Dec 14, 2023

LGTM apart from a tiny question (non-blocking)

docs/builds.md Outdated
```

For SSH keys, one approach is to hardcode the SSH authorized keys under `/usr` so it's part of
the clearly immutable state:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd stress this is something "easily" doable for the root user as the example shows - for "other" users, tying the containerfile to whichever way we actually add user at installation seems a bit off to me (as the users are not there, root is)

Copy link

@runcom runcom Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I just fear this could set a bad example going forward, and I'd leave ssh keys to the "provisioning/deploy" part)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many, if not most deployments will definitely want the flexibility of providing keys externally. But not all. And it's also convenient to have the keys part of the container image for those that want to be able to update/rotate it "day 2" without extra tooling.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that, I think it's just weird to add keys to an image for users other than root as there's nothing that says "and then create this user" so these keys are just laying around (no biggie tho, just something I remember also Timothee brought up when I demo'ed the kiosk app)

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we point users to cloud-init and ignition?

Adding SSH works for some use cases but I feel like cloud-init and ignition offer much more flexibility.

@cgwalters
Copy link
Member Author

Should we point users to cloud-init and ignition?

I just did cloud-init for now...ignition requires a lot of operating system integration and runs really fast into the case of "maybe I should be deriving from the edge/coreos image" which is its own world.

Since this is a complex tricky topic.
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@cgwalters cgwalters merged commit d3f38f6 into CentOS:main Dec 15, 2023
3 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants