Debian Bug report logs -
#482069
adduser: If uid 999 exists, next system uid will be between 0-99
Reported by: Durk Strooisma <durk@kern.nl>
Date: Tue, 20 May 2008 16:06:02 UTC
Severity: normal
Found in version adduser/3.107
Done: Stephen Gran <sgran@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#482069; Package adduser.
(full text, mbox, link).
Acknowledgement sent to Durk Strooisma <durk@kern.nl>:
New Bug report received and forwarded. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
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
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#482069; Package adduser.
(full text, mbox, link).
Acknowledgement sent to Joerg Hoh <joerg@joerghoh.de>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #10 received at 482069@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#482069; Package adduser.
(full text, mbox, link).
Acknowledgement sent to "Durk Strooisma" <durk@kern.nl>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #15 received at 482069@bugs.debian.org (full text, mbox, reply):
> 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.
Reply sent to Stephen Gran <sgran@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Durk Strooisma <durk@kern.nl>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #20 received at 482069-done@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
This one time, at band camp, Durk Strooisma said:
> > 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.
No problem. Take care, and good luck.
--
-----------------------------------------------------------------
| ,''`. Stephen Gran |
| : :' : sgran@debian.org |
| `. `' Debian user, admin, and developer |
| `- http://www.debian.org |
-----------------------------------------------------------------
[signature.asc (application/pgp-signature, inline)]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 19 Jun 2008 07:38:05 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Jul 1 21:32:01 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.