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

Re: /etc/passwd & user IRC



On Fri, Sep 01, 2000 at 09:46:15PM +0200, Matus fantomas Uhlar wrote:
> Hello,
> 
> I was searching for UID of irc user (some time ago I've seen such user
> exists); now I can't find it. adding of irc package runs adduser --system
> which is nice but I don't prefer that method (some UIDs were already
> allocated for some users sometie ago, why not to use them?).

for some reason debian prefers to use dynamically allocated accounts
for daemons and other software that does not require a static uid.

i tend to prefer static uids since it keeps my passwd files more
syncronised across machines.  

> dpkg -S /etc/passwd tells /etc/passwd belongs to no package (very nice...)

like others have said, it belongs to no package its updated and
maintained however by base-passwd.

> Now, please don't advise just get one free number; if you can respond
> - why doesn't /etc/passwd belong to any package ?

see above and other mails.

> - why was user 'irc' removed ?

are you running woody? on my potato system i have a irc uid 39
account, and its in /usr/share/base-passwd/passwd.master.  

> - is it safe to create user with uid 39 that was used for irc some time ago?

no.  uid 0 - 99 are reserved for debian, if you allocate accounts in
this uid space they could be clobbered (replaced) with later
base-passwd updates.  

from debian-policy:

   No package except base-passwd may modify /etc/passwd, /etc/shadow, or /etc/group.

   The UID and GID ranges are as follows:

   0-99:
          Globally allocated by the Debian project, must be the same on every Debian system. These ids will appear in the
          passwd and group files of all Debian systems, new ids in this range being added automatically as the
          base-passwd package is updated.

          Packages which need a single statically allocated uid or gid should use one of these; their maintainers should
          ask the base-passwd maintainer for ids.

   100-999:
          Dynamically allocated system users and groups. Packages which need a user or group, but can have this user or
          group allocated dynamically and differently on each system, should use `adduser --system' to create the group
          and/or user. adduser will check for the existence of the user or group, and if necessary choose an unused id
          based on the ranged specified in adduser.conf.

   1000-29999:
          Dynamically allocated user accounts. By default adduser will choose UIDs and GIDs for user accounts in this
          range, though adduser.conf may be used to modify this behavior.

   30000-59999:
          Reserved.

   60000-64999:
          Globally allocated by the Debian project, but only created on demand. The ids are allocated centrally and
          statically, but the actual accounts are only created on users' systems on demand.

          These ids are for packages which are obscure or which require many statically-allocated ids. These packages
          should check for and create the accounts in /etc/passwd or /etc/group (using adduser if it has this facility)
          if necessary. Packages which are likely to require further allocations should have a `hole' left after them in
          the allocation, to give them room to grow.

   65000-65533:
          Reserved.

   65534:
          User `nobody.'

   65535:
          (uid_t)(-1) == (gid_t)(-1). NOT TO BE USED, because it is the error return sentinel value.


> - why does ircd package create user irc then ?

because irc needs to run as someone, and it needs to read and write
files, that means nobody and daemon are not an option, and you don't
want ircd running as root do you?

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpp0K1NdsH63.pgp
Description: PGP signature


Reply to: