Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#14507 - Policykit's group gid is >=1000

Attached to Project: Arch Linux
Opened by Magnus Therning (magus) - Thursday, 30 April 2009, 05:22 GMT
Last edited by Jan de Groot (JGC) - Friday, 08 May 2009, 19:31 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Description: When installing policykit it creates a user and a group, in my case the user got uid 102 (ie a "system service" user) and the group got gid 1001 (ie a user group). That doesn't smell right :-)

Arguably the install script should use "groupadd --system policykit".

Additional info:
* package version: 0.9-7

Steps to reproduce:
Just install policykit :-)
This task depends upon

Closed by  Jan de Groot (JGC)
Friday, 08 May 2009, 19:31 GMT
Reason for closing:  Fixed
Comment by Alessandro Doro (adoroo) - Saturday, 02 May 2009, 11:29 GMT
Here (i686):
$ id policykit
uid=102(policykit) gid=130(policykit) groups=130(policykit)

(the UID is hard-coded in the policykit install script)

$ egrep D_MIN\|D_MAX /etc/login.defs
UID_MIN 1000
UID_MAX 60000
GID_MAX 60000

$ groupadd --system newgroup
gives a GID < 100

So in the default Arch Linux configuration "user" IDs begins with 100.
Your 1001 gid seems very strange; have you messed with something?
Comment by Jan de Groot (JGC) - Saturday, 02 May 2009, 11:33 GMT
Your policykit installation is from when it was in AUR and it had a static GID assigned.
Comment by Magnus Therning (magus) - Saturday, 02 May 2009, 14:36 GMT
@ Allessandro, yes indeed it would. And looking at policykit.install shows that it's creating the user with an explicit uid of 102, while the group isn't. No, haven't messed with anything. Looking at the .install file for policykit I found this:

post_install() {
getent group policykit >/dev/null || usr/sbin/groupadd policykit
getent passwd policykit >/dev/null || usr/sbin/useradd -c 'PolicyKit' -u 102 -g policykit -d '/' -s /sbin/nologin policykit

In my case this resulted in a group with gid 1001.

I did some testing:

# groupadd foo # created a group with gid 1001
# groupadd --system bar # created a group with gid 89

Many Linux systems use GIDs 0-100 for system services, GIDs 101-1000 is also used for system services, and GIDs >= 1001- is for users. This page suggests that Arch is following that as well

@Jan, I assume your comment is to Allessandro, since my install is about a week old :-)