[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why do UID values of system users matter?



On Fri 16 Aug 2019 at 23:27:27 (+0200), Steffen Dettmer wrote:
> 
> just for my curiosity I wonder why the numeric UID values matter at all,
> for example:
> 
>   update-passwd has found a difference between your system
>   accounts and the current Debian defaults. It is advisable to
>   allow update-passwd to change your system; without those
>   changes some packages might not work correctly. For more
>   documentation on the Debian account policies, please see
>   /usr/share/doc/base-passwd/README.
> 
>   The proposed change is:
> 
>   Change the UID of user "man" from 13 to 6
> 
> (Apparently man used uid 13 in Debian 8 / Jessi but 6 in Debian 9 /
> Stretch).

Very odd. The master lists are in /usr/share/base-passwd/*master and
the jessie version (3.5.37) has man as 6 and 12. Going back to woody
(Debian 3.0 from 2002), the UID is still 6, though the GID at that
time was 100, the "users" group, shared by several system UIDs.

> Normally I would assume that the numeric values would not be use
> anywhere at all, only the symbolic names.

OSes and filesystems use numbers rather than names for efficiency:
even a modern 32-bit UID only uses the space of four ASCII characters,
whereas some of the UID/GID names are long, eg systemd-bus-proxy
and debian-security-support.

> If the numeric value matters, why are their values no kept across releases?

Because that presents too much administrative effort, which dynamic
allocation is designed to avoid. You just have to exercise care
if/when you copy files between different systems in "inappropriate"
ways, eg using cp when you have two installations in the same PC.

Cheers,
David.


Reply to: