Debian Bug report logs -
#145430
deluser 3.47 when multiple usernames correspond to a single uid
Reported by: jon <jon@elephants.org>
Date: Wed, 1 May 2002 19:03:01 UTC
Severity: normal
Tags: help
Fixed in version adduser/3.106
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, Roland Bauerschmidt <rb@debian.org>, unknown-package@qa.debian.org, adduser@packages.qa.debian.org, 3.47@packages.qa.debian.org:
Bug#145430; Package adduser 3.47.
(full text, mbox, link).
Acknowledgement sent to jon <jon@elephants.org>:
New Bug report received and forwarded. Copy sent to Roland Bauerschmidt <rb@debian.org>, unknown-package@qa.debian.org, adduser@packages.qa.debian.org, 3.47@packages.qa.debian.org.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
package: adduser 3.47
deluser 3.47 deletes accounts by (numerical) UID. Multiple users can
correspond to a UID, deluser provides no confirmation/sanity checks in
this case. This is entirely consistent, but it can result in
surprising results.
ie: The sash shell package can (depending on configs) create a
'sashroot' emergency maintenance account, UID=0.
"deluser --remove-all-files sashroot" resulted in a nasty surprise.
suggestion:
check for multpile users sharing the same numerical ID,
print all user names, and prompt for confirmation before proceeding.
best regards,
jon
Tags added: help
Request was from Marc Haber <mh+debian-packages@zugschlus.de>
to control@bugs.debian.org.
(full text, mbox, link).
Acknowledgement sent to Marc Haber <mh+debian-packages@zugschlus.de>:
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message #14 received at 145430-quiet@bugs.debian.org (full text, mbox, reply):
tags #145430 help
thanks
On Wed, May 01, 2002 at 02:48:34PM -0400, jon wrote:
> ie: The sash shell package can (depending on configs) create a
> 'sashroot' emergency maintenance account, UID=0.
> "deluser --remove-all-files sashroot" resulted in a nasty surprise.
Never delete an account without checking its home directory first.
> suggestion:
> check for multpile users sharing the same numerical ID,
> print all user names, and prompt for confirmation before proceeding.
I don't like the idea of having deluser going interactive since it is
frequently called from scripts.
I don't see an easy fix for this problem without doing major re-work
on deluser and would like to ask for suggestions.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Karlsruhe, Germany | lose things." Winona Ryder | Fon: *49 721 966 32 15
Nordisch by Nature | How to make an American Quilt | Fax: *49 721 966 31 29
Acknowledgement sent to Joerg Hoh <joerg@joerghoh.de>:
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message #22 received at 145430-quiet@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Mittwoch 24 März 2004, Marc Haber wrote:
> On Wed, May 01, 2002 at 02:48:34PM -0400, jon wrote:
> > ie: The sash shell package can (depending on configs) create a
> > 'sashroot' emergency maintenance account, UID=0.
> > "deluser --remove-all-files sashroot" resulted in a nasty surprise.
The whole unix password stuff doesn't support such a config very well. E.g the
getpwnam* functions do return exactly none or one result when requesting the
username for the user with uid = 0.
> I don't see an easy fix for this problem without doing major re-work
> on deluser and would like to ask for suggestions.
This is getting rather complicated because such a request is not supported by
standard libc functions like getpw*. We had to parse /etc/passwd manually for
such a double entry. This will result in rather unportable code which doesn't
cope very well with NIS and LDAP.
Jörg
--
What did you do to the cat? It looks half-dead. -Schroedinger's wife
[signature.asc (application/pgp-signature, inline)]
Acknowledgement sent to "Jon Shickel" <jon@elephants.org>:
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message #30 received at 145430-quiet@bugs.debian.org (full text, mbox, reply):
On 6/27/07, Joerg Hoh <joerg@joerghoh.de> wrote:
> On Mittwoch 24 März 2004, Marc Haber wrote:
>
> > On Wed, May 01, 2002 at 02:48:34PM -0400, jon wrote:
> > > ie: The sash shell package can (depending on configs) create a
> > > 'sashroot' emergency maintenance account, UID=0.
> > > "deluser --remove-all-files sashroot" resulted in a nasty surprise.
>
> The whole unix password stuff doesn't support such a config very well. E.g the
> getpwnam* functions do return exactly none or one result when requesting the
> username for the user with uid = 0.
>
> > I don't see an easy fix for this problem without doing major re-work
> > on deluser and would like to ask for suggestions.
>
> This is getting rather complicated because such a request is not supported by
> standard libc functions like getpw*. We had to parse /etc/passwd manually for
> such a double entry. This will result in rather unportable code which doesn't
> cope very well with NIS and LDAP.
> Jörg
Wow, that was a while ago! Thanks for including me.
I am of mixed mind about this. I can clearly see the utility of a
static shell account.
Yet, as you note, unix doesn't support multiple users with the same
UID gracefully
and it deleted almost all of my system before it died.
I tend to think the sash package is most to blame for introducing a second root
account. I think the sash account should probably warn users of the consequences
and to manually remove the sashroot account if they chance their
minds. This doesn't
take care of cases where one administrator creates it and another user
deletes it.
Out of curiosity, does it ever make sense to allow deluser to remove
UID = 0 account?
If it is the true root account, the system probably wouldn't be usable
would it? If it isn't
true root, well, bad things can happen. I know this goes against the
general unix theology
of letting the user do what he want, but it seems like all outcomes in
this case are bad.
Jon
Acknowledgement sent to Joerg Hoh <joerg@joerghoh.de>:
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message #38 received at 145430-quiet@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi
On Wed, Jul 04, 2007 at 01:29:04PM -0400, Jon Shickel wrote:
>
> Wow, that was a while ago! Thanks for including me.
>
I just try to get rid of the old cruft lying around in the bts :-)
> I am of mixed mind about this. I can clearly see the utility of a
> static shell account.
> Yet, as you note, unix doesn't support multiple users with the same
> UID gracefully
> and it deleted almost all of my system before it died.
>
> I tend to think the sash package is most to blame for introducing a second
> root
> account. I think the sash account should probably warn users of the
> consequences
> and to manually remove the sashroot account if they chance their
> minds. This doesn't
> take care of cases where one administrator creates it and another user
> deletes it.
This seems to be the best solution being sash the only package I'm aware of
which introduces such a thing.
> Out of curiosity, does it ever make sense to allow deluser to remove
> UID = 0 account?
Adding a warning shouldn't be a problem.
Jörg
--
What did you do to the cat? It looks half-dead. -Schroedinger's wife
[signature.asc (application/pgp-signature, inline)]
Reply sent to Stephen Gran <sgran@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to jon <jon@elephants.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #46 received at 145430-close@bugs.debian.org (full text, mbox, reply):
Source: adduser
Source-Version: 3.106
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.106.dsc
to pool/main/a/adduser/adduser_3.106.dsc
adduser_3.106.tar.gz
to pool/main/a/adduser/adduser_3.106.tar.gz
adduser_3.106_all.deb
to pool/main/a/adduser/adduser_3.106_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 145430@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: Sun, 02 Mar 2008 16:57:21 +0000
Source: adduser
Binary: adduser
Architecture: source all
Version: 3.106
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: 145430 435778 439212 442203 447104 447868 451321 451967 452289 452290 453419 454928 468152
Changes:
adduser (3.106) unstable; urgency=low
.
[ Joerg Hoh ]
* adduser exits with returncode 1 if trying to add an already existing user
as system user. Thanks to Vincent Bernat; Closes: #435778
* deluser: warn if you want to remove the root account. Closes: #145430
* deluser: fix backup when bzip2 is not available. Closes: #453419
* deluser: print correct warning when you removed the last user in a group;
thanks Marc 'Zugschlus' Haber and Peter Eisentraut
(Closes: #454928,#451967)
.
[ Stephen Gran ]
* Translation:
be (thanks Pavel Piatruk <berserker@neolocation.com>)( closes: #447104)
fr (thanks Nicolas François <nicolas.francois@centraliens.net>)
(closes: #442203)
ru (thanks Yuri Kozlov <kozlov.y@gmail.com>)(closes: #452289, #452290)
sk (thanks Ivan Masár <helix84@centrum.sk>)(closes: #439212)
zh_CN (thanks LI Daobing <lidaobing@gmail.com>)(closes: #447868)
* Clarify --in-group documentation (closes: #468152)
* deluser: Let tar gzip/bzip backups directly (closes: #451321)
* Update Standards Version (no changes)
* Homepage, Vcs-Svn and Vcs-Browser fields added
* Do nothing in binary-arch
Files:
542e266dab99f99dea31a4ba016fd7d7 835 admin important adduser_3.106.dsc
3329395cc47d3f5f147e87028736387b 262830 admin important adduser_3.106.tar.gz
be4885c8629de328cc18cff8352d280e 183366 admin important adduser_3.106_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHyt0bSYIMHOpZA44RAoekAKDP4rjhUqCdHRv0lnrQyQTGnK2fbgCfX/Jo
ffCcTqO+7IMpzabvF+jGodA=
=bPI8
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 11 Apr 2008 07:33:23 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:29 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.