How should I choose the proper uid
(or gid
) for system users being created in a custom .rpm package?
The user will be used to run a daemon non-root.
I think it's not acceptabe to let adduser
choose the next ID by omitting --uid
because this could create a conflict with fixed uid
s of official packages. Further, this could lead to different IDs across multiple systems, making further administration harder.
Are there ranges of unused and unreserved uid
s that can be used (as far as they're not reused in the local environment)? Is there a algorithm to generate a uid
/gid
?
This question applies to RedHat EL 6+, CentOS 6+ and Fedora. The package's .srpm or .spec should get published.