[aur-general] Create user

Eli Schwartz eschwartz at archlinux.org
Fri May 22 03:00:33 UTC 2020


On 5/21/20 10:29 PM, karx via aur-general wrote:
> Hey,
> 
> An application I'm thinking about packaging for AUR requires its own user
> to run. Is it ok to be/How would I go about creating a "user" that will be
> created on the installer's system when they install the package?

Use sysusers.d(5) to install a description of the user you need. systemd
comes with a pacman hook to create users based on sysusers.d dropins
(and for non-systemd distros using e.g. OpenRC, there are
reimplementations like opensysusers, because this is generally portable
and beneficial to use).

You can usually specify the "-" placeholder instead of a reserved,
hardocded uid, and have one automatically assigned. This is preferable
whenever possible.

You can check the output of

$ pkgfile -vr '/usr/lib/sysusers.d/.*\.conf'

to see which packages in the repositories use sysusers.d files, and see
how they are using it for inspiration. (Or see which packages on your
system provide files in /usr/lib/sysusers.d/)

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20200521/8b458e6a/attachment.sig>


More information about the aur-general mailing list