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

Ubuntu needs system uid range in adduser.conf #301

Open
willem640 opened this issue Apr 21, 2024 · 1 comment
Open

Ubuntu needs system uid range in adduser.conf #301

willem640 opened this issue Apr 21, 2024 · 1 comment

Comments

@willem640
Copy link

willem640 commented Apr 21, 2024

Unfortunately I'm not (yet) very familiar with the project so can't create a pull request for this. When installing dbus in an Ubuntu stratum (hijacked Fedora), apt gives me the following error:
fatal: The user 'messagebus' already exists, but is not a system user. Exiting.

This is because Ubuntu uses 100-999 as the system uid/gid range by default, but Fedora uses 1-999. Bedrock correctly has /etc/login.defs as a global file, but adduser uses /etc/adduser.conf in Ubuntu.

My proposed solution:
The following options should be imported from login.defs or synchronized between login.defs and adduser.conf:

/etc/login.defs - /etc/adduser.conf
SYS_UID_MIN - FIRST_SYSTEM_UID
SYS_UID_MAX - LAST_SYSTEM_UID
SYS_GID_MIN - FIRST_SYSTEM_GID
SYS_GID_MAX - LAST_SYSTEM_GID

Perhaps the same should be done for FIRST_UID, LAST_UID, FIRST_GID and LAST_GID. Those values have the same name in login.defs.

Maybe someone can make a PR for this (or tell me how to do it). Thanks!

@paradigm
Copy link
Member

Bedrock does make some effort to resolve this concern, but I'm not fresh on this area to recall specifics. Take a look at enforce_id_ranges in /bedrock/share/common-code This should be called both when brl enable and brl repairing a stratum.

You seem interested in not just reporting the issue but contributing here. Could you investigate why the current solution is inadequate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants