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

Fix: Docker user warning UID is greater than SYS_UID_MAX #1056

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

z017
Copy link

@z017 z017 commented Nov 21, 2024

Description

Currently docker entrypoints create users as system users by using the -r flag of useradd:

useradd -r -u $USERID -g $GROUPID bitcoin

The default user uid is 1000 greater than SYS_UID_MAX resulting in the following warning:

useradd warning: bitcoin's uid 1000 is greater than SYS_UID_MAX 999

To fix the warning:

  • The -r flag was removed.
    • That flag also avoid home directory creation and password aging information in /etc/shadow.
  • The -M flag was added to avoid home directory creation.
  • And the password aging information is not necessary because the user has no password.

References

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

Successfully merging this pull request may close these issues.

1 participant