[Rpm-maint] User IDs used in RPM packages.

David Cantrell dcantrell at redhat.com
Tue Mar 27 14:02:34 UTC 2007


On Tue, 2007-03-27 at 13:53 +0100, Richard Hodson wrote:
> Sorry if this seems slightly off topic, but it seems off topic everywhere I
> have looked online for info on RPMs.
> 
> I am building a package for some company software, and the safest thing to do
> is run it from Init under its own user ID, just like eg Apache web server uses
> user apache.  Thing is, how do I get a user ID that no-one else it using?
> 
> If you can point me in the right direction, I would be happy to put any such
> infomation into your wiki given that this is the root of all things RPM!

This is definitely a problem outside the scope of RPM.  Selecting a user
ID for a daemon process is a matter of policy.  I highly suggest
selecting one that is high and will be available on all systems you plan
to deploy the software on.

But, to answer the question, there's no simple way to get a user ID that
is available on a particular system.  Accounts don't really work that
way.  The big problem is where is the account information coming from on
your system.  /etc/passwd, LDAP, NIS, etc?

Pick an ID for this application and set that in stone as the one you'll
use on all platforms.

-- 
David Cantrell <dcantrell at redhat.com>
Red Hat / Westford, MA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.rpm.org/pipermail/rpm-maint/attachments/20070327/3be42111/attachment-0001.pgp 


More information about the Rpm-maint mailing list