Durk Strooisma
2008-May-20 15:57 UTC
Bug#482069: adduser: If uid 999 exists, next system uid will be between 0-99
Package: adduser Version: 3.107 Severity: normal If, for whatever reason, there''s a system user having uid 999, adduser will look for a uid starting from 0 when a new system user is created. In most cases it will find a free uid between 0-99, which is allocated by the Debian project and for that reason not desirable. In stead of what seems to happen in reality, I would expect that adduser would try to look for a free system uid starting from 100 in stead of 0. It seems to ignore the value of FIRST_SYSTEM_UID in this process. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, ''testing'') Architecture: i386 (i686) Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages adduser depends on: ii debconf [debconf-2.0] 1.5.21 Debian configuration management sy ii passwd 1:4.1.1-1 change and administer password and ii perl-base 5.10.0-10 The Pathologically Eclectic Rubbis adduser recommends no packages. -- debconf information excluded
Joerg Hoh
2008-May-20 18:39 UTC
[Adduser-devel] Bug#482069: adduser: If uid 999 exists, next system uid will be between 0-99
On Tue, May 20, 2008 at 05:57:50PM +0200, Durk Strooisma wrote:> > If, for whatever reason, there''s a system user having uid 999, adduser > will look for a uid starting from 0 when a new system user is created.I guess the relevant part starts at line 387 off adduser elsif (!defined($new_uid) && !$make_group_also) { $new_uid = &first_avail_uid($config{"first_system_uid"}, $config{"last_system_uid"}); if ($new_uid == -1) { print STDERR "$0: "; printf STDERR gtx("No UID is available in the range %d-%d (FIRST_SYS_UID - LAST_SYS_UID).\n"),$config{"first_system_uid"},$config{"last_system_uid"}; dief (gtx("The user `%s'' was not created.\n"),$new_name); } if first_avail_uid returns -1 (which is indicating that in the range FIRST_SYS_UID and LAST_SYS_UID there was no free uid), adduser will stop. I don''t see any overflow which causes adduser to start at uid 0 again. Please correct me if I''m wrong, but I don''t get the problem. J?rg -- What did you do to the cat? It looks half-dead. -Schroedinger''s wife -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20080520/7bc5d190/attachment.pgp
Durk Strooisma
2008-May-21 08:28 UTC
[Adduser-devel] Bug#482069: adduser: If uid 999 exists, next system uid will be between 0-99
> if first_avail_uid returns -1 (which is indicating that in the range > FIRST_SYS_UID and LAST_SYS_UID there was no free uid), adduser will stop. > I don''t see any overflow which causes adduser to start at uid 0 again. > > Please correct me if I''m wrong, but I don''t get the problem.Hi, I didn''t check the code, but while trying to reproduce my described problem, I couldn''t and saw that I made a terrible mistake. I invoked useradd in stead of adduser.. :-( Adduser IS working the way you would expect. Sorry for the noise. Bug can be closed.
Debian Bug Tracking System
2008-May-21 10:03 UTC
[Adduser-devel] Bug#482069: marked as done (adduser: If uid 999 exists, next system uid will be between 0-99)
Your message dated Wed, 21 May 2008 10:44:09 +0100 with message-id <20080521094409.GA13138 at www.lobefin.net> and subject line Re: [Adduser-devel] Bug#482069: adduser: If uid 999 exists, next system uid will be between 0-99 has caused the Debian Bug report #482069, regarding adduser: If uid 999 exists, next system uid will be between 0-99 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 482069: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482069 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Durk Strooisma <durk at kern.nl> Subject: adduser: If uid 999 exists, next system uid will be between 0-99 Date: Tue, 20 May 2008 17:57:50 +0200 Size: 2379 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20080521/8913a11b/attachment.eml -------------- next part -------------- An embedded message was scrubbed... From: Stephen Gran <sgran at debian.org> Subject: Re: [Adduser-devel] Bug#482069: adduser: If uid 999 exists, next system uid will be between 0-99 Date: Wed, 21 May 2008 10:44:09 +0100 Size: 3820 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20080521/8913a11b/attachment-0001.eml