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

uid and gid for linux dist #447

Closed
roboll opened this issue Dec 27, 2014 · 5 comments
Closed

uid and gid for linux dist #447

roboll opened this issue Dec 27, 2014 · 5 comments
Labels

Comments

@roboll
Copy link
Contributor

roboll commented Dec 27, 2014

in my projects i override postinst to assign a predetermined uid and gid to the created groups for dpkg distributions.

wondering if there's a general need to be able to assign uid and gid by the larger user base? - if so, i'd be happy to submit a pr.

@muuki88 muuki88 added debian and removed debian labels Dec 27, 2014
@muuki88
Copy link
Contributor

muuki88 commented Dec 27, 2014

Can you share your postinst code and build.sbt?
You are the first one asking for this, so maybe a small example
in the docs would be enough. On the otherside, a small autoplugin
is really easy.

@roboll
Copy link
Contributor Author

roboll commented Dec 28, 2014

right now it has no impact on my sbt build definition - i override src/debian/DEBIAN/postinst methods addGroup() and addUser() to take an additional argument, gid and uid respectively. i hardcode the uid and gid in the files.

in the groupadd and useradd calls, i add the appropriate flag if the additional arg is present.

if [ -z "$uid" ]; then
    uid_flag="--uid $uid"
fi
useradd $uid_flag ...

i'd rather see this included the same way group and user are - a key in the build definition.

daemonUser in Linux := "username"

daemonUid in Linux := "20000"

or maybe daemonUserId...

if there's no objection to including this, i'll throw something together this week - i'd much prefer to not hard code uid and gid in the postinst file.

@muuki88
Copy link
Contributor

muuki88 commented Dec 28, 2014

Sounds like a good plan. Looking forward to your pull request. Ping if you need any help.

@benmccann
Copy link
Contributor

Looks like this can be closed as fixed now

@muuki88 muuki88 closed this as completed Dec 31, 2014
@muuki88
Copy link
Contributor

muuki88 commented Dec 31, 2014

Ah, thanks :)

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

No branches or pull requests

3 participants