Debian Bug report logs -
#469165
/usr/sbin/deluser: deluser thinks I want to remove the root user
Reported by: Bram Senders <bram@luon.net>
Date: Mon, 3 Mar 2008 14:21:01 UTC
Severity: important
Merged with 470847,
471705
Found in version adduser/3.106
Fixed 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#469165; Package adduser.
(full text, mbox, link).
Acknowledgement sent to Bram Senders <bram@luon.net>:
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.106
Severity: important
File: /usr/sbin/deluser
Deluser gives an error and then thinks I want to remove the root user.
See the following transcript:
===
bram@tofu ~> sudo deluser --remove-all-files test
Use of uninitialized value in numeric eq (==) at /usr/sbin/deluser line 228.
WARNING: You are just about to delete the root account (uid 0)
Usually this is never required as it may render the whole system unusable
Press immediately Ctrl+C if you want to abort
===
The referenced line 228 contains the following: "if ($uid == 0) {", so I
guess $uid does not get set; this might be because the "getpwnam($user)"
call on line 211 is only done if the "system" config parameter is set.
Cheers,
Bram Senders
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.24-1-powerpc
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.19 Debian configuration management sy
ii passwd 1:4.1.0-2 change and administer password and
ii perl-base 5.8.8-12 The Pathologically Eclectic Rubbis
adduser recommends no packages.
-- debconf information:
adduser/homedir-permission: true
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#469165; 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 469165@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi
On Mon, Mar 03, 2008 at 03:19:35PM +0100, Bram Senders wrote:
> Package: adduser
> Version: 3.106
> Severity: important
> File: /usr/sbin/deluser
>
> Deluser gives an error and then thinks I want to remove the root user.
> See the following transcript:
>
> ===
> bram@tofu ~> sudo deluser --remove-all-files test
> Use of uninitialized value in numeric eq (==) at /usr/sbin/deluser line 228.
> WARNING: You are just about to delete the root account (uid 0)
> Usually this is never required as it may render the whole system unusable
> Press immediately Ctrl+C if you want to abort
> ===
>
> The referenced line 228 contains the following: "if ($uid == 0) {", so I
> guess $uid does not get set; this might be because the "getpwnam($user)"
> call on line 211 is only done if the "system" config parameter is set.
The correct variable would be "$pw_uid" which is always initialized with
the data of the user to delete (see line 173); the patch will go into next
release. Thanks for reporting.
Jörg
--
What did you do to the cat? It looks half-dead. -Schroedinger's wife
[signature.asc (application/pgp-signature, inline)]
Forcibly Merged 469165 470847.
Request was from Filippo Giunchedi <filippo@debian.org>
to control@bugs.debian.org.
(Sat, 15 Mar 2008 11:03:02 GMT) (full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#469165; Package adduser.
(full text, mbox, link).
Acknowledgement sent to koen@vermeer.tv:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #17 received at 469165@bugs.debian.org (full text, mbox, reply):
I just encountered the same bug. I was too slow to press ctrl-c in time,
and now I'm scared. Did it actually delete the root account? Did it delete
any account?
Thanks,
Koen
Forcibly Merged 469165 470847 471705.
Request was from Nicolas François <nicolas.francois@centraliens.net>
to control@bugs.debian.org.
(Thu, 20 Mar 2008 12:24:22 GMT) (full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#469165; Package adduser.
(full text, mbox, link).
Acknowledgement sent to neologix@free.fr:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
Your message did not contain a Subject field. They are recommended and
useful because the title of a $gBug is determined using this field.
Please remember to include a Subject field in your messages in future.
(full text, mbox, link).
Message #24 received at 469165@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Tags: patch
The patch attached solves this problem, and makes local some variables only used
in the block where the "system" option is tested.
Cheers,
Charles
[deluser_uid.diff (text/x-diff, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#469165; Package adduser.
(full text, mbox, link).
Acknowledgement sent to Francois Marier <francois@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #29 received at 469165@bugs.debian.org (full text, mbox, reply):
Just out of curiosity: Why would one ever want to delete the root user
account?
Is this something we should warn about or block entirely? I mean, I can't
see this action not being an error on the part of the user or of a script...
Francois
Information forwarded to debian-bugs-dist@lists.debian.org, pernegger@gmail.com, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#469165; Package adduser.
(full text, mbox, link).
Acknowledgement sent to Christian Pernegger <pernegger@gmail.com>:
Extra info received and forwarded to list. Copy sent to pernegger@gmail.com, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #34 received at 469165@bugs.debian.org (full text, mbox, reply):
Package: adduser
Version: 3.106
Followup-For: Bug #469165
Admittedly I don't delete users that often, so this bug may be here
for some time, but I'm wondering how this could get into 'testing'.
As it is deluser
- can't delete any user
- deletes the root account if one isn't very fast
Please remove the strange CTRL-C check and maybe add a --force flag
instead, without which such an operation would be impossible.
If a new adduser package isn't going to hit testing very soon please
consider rolling back the version in testing to the last working one
in the meantime.
*shudder*
Chris
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.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.20 Debian configuration management sy
ii passwd 1:4.1.0-2 change and administer password and
ii perl-base 5.8.8-12 The Pathologically Eclectic Rubbis
adduser recommends no packages.
-- debconf information:
adduser/homedir-permission: true
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#469165; Package adduser.
(full text, mbox, link).
Acknowledgement sent to Alexander Davydenko <mba@starnet.ru>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #39 received at 469165@bugs.debian.org (full text, mbox, reply):
Package: adduser
Version: 3.106
Followup-For: Bug #469165
Please see that:
my_host:~# deluser myuser
Use of uninitialized value in numeric eq (==) at /usr/sbin/deluser line 228.
WARNING: You are just about to delete the root account (uid 0)
Usually this is never required as it may render the whole system unusable
Press immediately Ctrl+C if you want to abort
Ok, you really want it, I'll delete that account
Fortunately it just a script mistake.
-- System Information:
Debian Release: lenny/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.22 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.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.19 Debian configuration management sy
ii passwd 1:4.1.0-2 change and administer password and
ii perl-base 5.8.8-12 The Pathologically Eclectic Rubbis
adduser recommends no packages.
-- debconf information:
adduser/homedir-permission: true
Reply sent to Stephen Gran <sgran@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Bram Senders <bram@luon.net>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #44 received at 469165-close@bugs.debian.org (full text, mbox, reply):
Source: adduser
Source-Version: 3.107
We believe that the bug you reported is fixed in the latest version of
adduser, which is due to be installed in the Debian FTP archive:
adduser_3.107.dsc
to pool/main/a/adduser/adduser_3.107.dsc
adduser_3.107.tar.gz
to pool/main/a/adduser/adduser_3.107.tar.gz
adduser_3.107_all.deb
to pool/main/a/adduser/adduser_3.107_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 469165@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Stephen Gran <sgran@debian.org> (supplier of updated adduser package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 27 Mar 2008 20:43:30 +0000
Source: adduser
Binary: adduser
Architecture: source all
Version: 3.107
Distribution: unstable
Urgency: low
Maintainer: Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>
Changed-By: Stephen Gran <sgran@debian.org>
Description:
adduser - add and remove users and groups
Closes: 469165 470464 470847 471705 471903 472349
Changes:
adduser (3.107) unstable; urgency=low
.
[ Joerg Hoh ]
* deluser: fix really annoying message about removing root account when removing
just a simple user. (Closes: #469165, #470464, #470847, #471705, #472349)
.
[ Stephen Gran ]
* Translations:
- eu (thanks Piarres Beobide <pi@beobide.net>)(closes: #471903)
Files:
0dd290f4b8f57d3d61413596163adf01 835 admin important adduser_3.107.dsc
85f472ae5cedaea852c487ce7f6bd1e3 264145 admin important adduser_3.107.tar.gz
f5bf39bfa88f28632bb193990976314f 172946 admin important adduser_3.107_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFH7AdrSYIMHOpZA44RAhXvAJ963469wSRtHT2vJjA5ly6CcnYikgCeP3zw
BDly+ZSSNl1pi52FpyHk3Bk=
=b/dk
-----END PGP SIGNATURE-----
Reply sent to Stephen Gran <sgran@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to William Lynch <wlynch@UDel.Edu>:
Bug acknowledged by developer.
(full text, mbox, link).
Reply sent to Stephen Gran <sgran@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Bug acknowledged by developer.
(full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 06 May 2008 07:29:49 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:03:07 2023;
Machine Name:
buxtehude
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.