[arch-general] list of user/group ids supplied by official packages
Is there a list of user/group IDs that official packages from [core] [extra] and [community] provide? I wish to insure that the user/group id in an AUR package I provide[1] does not conflict a user created by an official package. I can grep for 'useradd' in my abs tree and parse through the resulting 137 lines but there must be a better way. Thanks. 1. https://aur.archlinux.org/packages/kodi-standalone-service
On Fri, Jan 2, 2015 at 6:50 AM, member graysky <graysky@archlinux.us> wrote:
Is there a list of user/group IDs that official packages from [core] [extra] and [community] provide? I wish to insure that the user/group id in an AUR package I provide[1] does not conflict a user created by an official package. I can grep for 'useradd' in my abs tree and parse through the resulting 137 lines but there must be a better way. Thanks.
There's a wiki-based effort to track them here: https://wiki.archlinux.org/index.php/DeveloperWiki:UID_/_GID_Database A valiant initiative, I'll survey my system(s) and see if I can contribute anything... -te
On Fri, Jan 2, 2015 at 8:48 AM, Troy Engel <troyengel+arch@gmail.com> wrote:
https://wiki.archlinux.org/index.php/DeveloperWiki:UID_/_GID_Database
...and the first one I came across wasn't listed (git), I looked at it's .INSTALL file and see it's dynamic: ==== post_install() { if ! getent group git >/dev/null; then groupadd --system git fi if ! getent passwd git >/dev/null; then useradd --system -c 'git daemon user' -g git -d / -s /bin/bash git fi } ==== So there are core/extra/community packages using the system dynamic method which is probably what you should do as well, since everyone's 'git' UID/GID are most likely different. :( Makes it hard if you need to align across a cluster/shared filesystem, though. -te
Thanks for that link and for the info on dynamic UID's. On Fri, Jan 2, 2015 at 9:57 AM, Troy Engel <troyengel+arch@gmail.com> wrote:
On Fri, Jan 2, 2015 at 8:48 AM, Troy Engel <troyengel+arch@gmail.com> wrote:
https://wiki.archlinux.org/index.php/DeveloperWiki:UID_/_GID_Database
...and the first one I came across wasn't listed (git), I looked at it's .INSTALL file and see it's dynamic:
==== post_install() { if ! getent group git >/dev/null; then groupadd --system git fi if ! getent passwd git >/dev/null; then useradd --system -c 'git daemon user' -g git -d / -s /bin/bash git fi } ====
So there are core/extra/community packages using the system dynamic method which is probably what you should do as well, since everyone's 'git' UID/GID are most likely different. :( Makes it hard if you need to align across a cluster/shared filesystem, though.
-te
On Fri, Jan 2, 2015 at 9:00 AM, member graysky <graysky@archlinux.us> wrote:
Thanks for that link and for the info on dynamic UID's.
You're welcome - and I think you've helped uncover a small bug (well, enhancement) - I found two new systemd* users with suspiciously high UIDs: systemd-journal-remote:x:998:998:systemd Journal Remote:/:/sbin/nologin systemd-journal-upload:x:997:997:systemd Journal Upload:/:/sbin/nologin I'm pretty sure since package 'filesystem' isn't creating them (just checked) that systemd is creating them dynamically at runtime, searching through code now to prepare a bug report... -te
On January 2, 2015 4:14:07 PM GMT+01:00, Troy Engel <troyengel+arch@gmail.com> wrote:
and I think you've helped uncover a small bug (well, enhancement) - I found two new systemd* users with suspiciously high UIDs:
I'm pretty sure since package 'filesystem' isn't creating them (just checked) that systemd is creating them dynamically at runtime, searching through code now to prepare a bug report...
It's actually meant to be that way. The systemd-sysusers service allocates ids from 999 downwards. --Oliver Temlin
On Fri, Jan 2, 2015 at 12:49 PM, Oliver Temlin <temlin@gmail.com> wrote:
It's actually meant to be that way. The systemd-sysusers service allocates ids from 999 downwards.
*nod* talking to falconindy about it more and trying to read the systemd code, during ./configure it reads /etc/login.defs and uses either the SYS_UID_MAX or 999 if that's missing (or a cli option). The list of users it creates is in systemd-remote.conf[1] but then I was confused as it seems that out of the 3 currently listed there one (systemd-journal-gateway) *has* to be created by the packaging first (I found a bug report for the same thing in both Arch & RHEL - RHEL .spec also creates this user like Arch) but the other two do not. *shrug* -te [1] https://github.com/systemd/systemd/blob/master/sysusers.d/systemd-remote.con...
This is related to / mirroring the functionality of the -r switch of useradd, which populates (at least as configured in the shadow package provided by Arch) from 999 downward. On Fri, Jan 02, 2015 at 01:17:25PM -0600, Troy Engel wrote:
On Fri, Jan 2, 2015 at 12:49 PM, Oliver Temlin <temlin@gmail.com> wrote:
It's actually meant to be that way. The systemd-sysusers service allocates ids from 999 downwards.
*nod* talking to falconindy about it more and trying to read the systemd code, during ./configure it reads /etc/login.defs and uses either the SYS_UID_MAX or 999 if that's missing (or a cli option). The list of users it creates is in systemd-remote.conf[1] but then I was confused as it seems that out of the 3 currently listed there one (systemd-journal-gateway) *has* to be created by the packaging first (I found a bug report for the same thing in both Arch & RHEL - RHEL .spec also creates this user like Arch) but the other two do not. *shrug*
-te
[1] https://github.com/systemd/systemd/blob/master/sysusers.d/systemd-remote.con...
-- David J. Haines djhaines@gmx.com 0xAFB3D16D - F929 270F B7C3 78AE A741 434F A7C6 F264 AFB3 D16C
participants (4)
-
David J. Haines
-
member graysky
-
Oliver Temlin
-
Troy Engel