[asterisk-users] Standard UIDs, especially for asterisk?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Nov 16 15:08:37 CST 2011


On Tue, Nov 15, 2011 at 04:53:02PM +0000, Tony Mountifield wrote:
> In article <4EC296B9.8040506 at digium.com>,
> Jason Parker <jparker at digium.com> wrote:
> > On 11/15/2011 10:42 AM, Tony Mountifield wrote:
> > > Yes, I was hoping to use such a system user and group for asterisk, which
> > > would not conflict with any other system package I might install in the
> > > future, by virtue of being reserved for asterisk.
> > > 
> > 
> > There shouldn't be any conflict either way.  (Properly written) packages don't
> > specify a UID to use - they just get created sequentially, so the next available
> > ID is used.
> 
> If that were the case, I would expect different installations of the
> same distro (with varying package selections) to have different values
> for UIDs of specific system users.  But examination of several different
> RH-based systems from FC1 through to CentOS 6 shows the same values
> being used.  I would be reluctant to label all such packages as
> improperly written :-)

RPM and DEB work differently in this case. With deb packages you just
extract the package onto the system. If anything is non-root it is
extracted by UID. However typically all the files are owned by root and
if there's any need to change ownership, it is done by the post-install
script.

RPM has a different way: it keeps record of the user and group *name* of
each packaged file. When the file is unpacked, it applies the UID and
GIU of the user/group from the current system. Thus if a file belongs to
'mysql' and mysql's UID on the system is 56, it will be chown-ed to 56.
This is why users and groups need to be created in a pre-install script:
before the package is unpacked.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list