Debian Bug report logs -
#545714
deluser does not remove empty main group when the user is member of it
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#545714; Package adduser.
(Tue, 08 Sep 2009 17:30:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Milan Bouchet-Valat <nalimilan@club.fr>:
New Bug report received and forwarded. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(Tue, 08 Sep 2009 17:30:05 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: adduser
Version: 3.110
Hi!
I've hit a problem when trying to fix a bug in the
system-tools-backends/gnome-system-tools, and I discovered a strange
behavior from deluser. If you add an user to its main group, deluser
won't automatically remove that group when deleting the user, even if
he's the only member left. On the other hand, if the user is not member
of his main group, the group is removed (with a message: "Warning: group
X is now empty.", which could be more explicit about what it does BTW).
So I'm wondering if there's a rationale about that, or if that's merely
a bug. This will affect what we should do too.
Additionally, I've noticed that adduser does not add the new user to its
main group. Why? I'd like your feedback on that separate matter since
I'd like to rework the way the gnome-system-tools manage the main group.
ATM, we always add the user to his main group (thus hitting the present
bug), but that may be a wrong policy. Anyway, we should be able to
depend on adduser instead of doing our own decisions before calling that
tool.
Thanks for your feedback!
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#545714; Package adduser.
(Wed, 26 May 2010 09:06:03 GMT) (full text, mbox, link).
Acknowledgement sent
to "C. Gatzemeier" <c.gatzemeier@tu-bs.de>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(Wed, 26 May 2010 09:06:03 GMT) (full text, mbox, link).
Message #10 received at 545714@bugs.debian.org (full text, mbox, reply):
By not adding the user (a second time) to its maingroup in /etc/groups,
adduser identifies the group as a user private group, and is able to
remove the group together with the user, if the group is not used
otherwise (standard case for debian UPGs).[0]
So "deluser does not remove empty main group when the suer is
member of it" because the "suer" ;-) in his own group means, the group
was not created by the means of adduser with user private groups
enabled.
Does that answer your question so you can
close 545714
[0]http://lists.alioth.debian.org/pipermail/adduser-devel/2008-February/003161.html
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#545714; Package adduser.
(Wed, 23 Nov 2011 08:54:16 GMT) (full text, mbox, link).
Acknowledgement sent
to Marc Haber <mh+debian-packages@zugschlus.de>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(Wed, 23 Nov 2011 08:54:16 GMT) (full text, mbox, link).
Message #15 received at 545714@bugs.debian.org (full text, mbox, reply):
retitle #545714 deluser does not remove empty main group when the user is member of it
thanks
Hi Milan,
On Wed, May 26, 2010 at 11:03:19AM +0200, C. Gatzemeier wrote:
> Does that answer your question so you can
> close 545714
May I remind?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 31958062
Changed Bug title to 'deluser does not remove empty main group when the user is member of it' from 'deluser does not remove empty main group when the suer is member of it'
Request was from Marc Haber <mh+debian-packages@zugschlus.de>
to control@bugs.debian.org.
(Wed, 23 Nov 2011 08:54:19 GMT) (full text, mbox, link).
Message sent on
to Milan Bouchet-Valat <nalimilan@club.fr>:
Bug#545714.
(Wed, 23 Nov 2011 08:54:28 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>:
Bug#545714; Package adduser.
(Wed, 23 Nov 2011 12:16:36 GMT) (full text, mbox, link).
Acknowledgement sent
to Milan Bouchet-Valat <nalimilan@club.fr>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>.
(Wed, 23 Nov 2011 12:17:52 GMT) (full text, mbox, link).
Message #25 received at 545714@bugs.debian.org (full text, mbox, reply):
Le mercredi 23 novembre 2011 à 09:52 +0100, Marc Haber a écrit :
> retitle #545714 deluser does not remove empty main group when the user is member of it
> thanks
>
> Hi Milan,
>
> On Wed, May 26, 2010 at 11:03:19AM +0200, C. Gatzemeier wrote:
> > Does that answer your question so you can
> > close 545714
>
> May I remind?
Ah, sorry, for some reason I must have missed that question. It's sad
because back at the time I would have been very interested in the
reply. ;-)
But now I don't even remember what solution I found. I think user-admin
no longer adds new users to their main group (at least I can't find such
an operation in the code), but I can't find when that behavior was
changed.
I still think the error message that is printed when the user was *not*
member of his main group, which is:
"Warning: group X is now empty."
should be fixed, as it is clearly wrong. This warning should be printed
when the group *is not* removed ; and when the group is removed, deluser
would better say:
"Empty group X has been automatically deleted."
Information stored
:
Bug#545714; Package adduser.
(Wed, 23 Nov 2011 12:20:25 GMT) (full text, mbox, link).
Acknowledgement sent
to Milan Bouchet-Valat <nalimilan@club.fr>:
Extra info received and filed, but not forwarded.
(Wed, 23 Nov 2011 12:20:55 GMT) (full text, mbox, link).
Message sent on
to Milan Bouchet-Valat <nalimilan@club.fr>:
Bug#545714.
(Wed, 23 Nov 2011 12:21:44 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Adduser Developers <adduser@packages.debian.org>:
Bug#545714; Package adduser.
(Wed, 07 Dec 2022 18:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Marc Haber <mh+debian-packages@zugschlus.de>:
Extra info received and forwarded to list. Copy sent to Debian Adduser Developers <adduser@packages.debian.org>.
(Wed, 07 Dec 2022 18:21:03 GMT) (full text, mbox, link).
Message #38 received at 545714@bugs.debian.org (full text, mbox, reply):
Control: tags -1 moreinfo
thanks
Hi,
I am coming back to this bug report after more than a decade. Sorry for
that. The mess in adduser is slowly beginning to clear up.
For this issue, I need a better reproducer. If you're still interested
in this, it might be useful if you submit a typescript of commands and
their output, and from the point on where the results are unexpected I
would like to know what happens and what you would expect.
Are you talking about the behavior of deluser when a user has the same
group both as primary group and as supplementary group?
If so, things seem to be fine now:
root@fan-sid-buildd-amd64-zyui:/srv# addgroup keks
Adding group `keks' (GID 1000) ...
Done.
root@fan-sid-buildd-amd64-zyui:/srv# adduser --ingroup keks kruemel
Adding user `kruemel' ...
Adding new user `kruemel' (1001) with group `keks (1000)' ...
Creating home directory `/home/kruemel' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for kruemel
Enter the new value, or press ENTER for the default
Full Name []: Monster
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
Adding new user `kruemel' to supplemental / extra groups `users' ...
Adding user `kruemel' to group `users' ...
root@fan-sid-buildd-amd64-zyui:/srv# getent passwd kruemel
kruemel:x:1001:1000:Monster,,,:/home/kruemel:/bin/bash
root@fan-sid-buildd-amd64-zyui:/srv# getent group keks
keks:x:1000:
root@fan-sid-buildd-amd64-zyui:/srv# adduser kruemel keks
Adding user `kruemel' to group `keks' ...
Done.
root@fan-sid-buildd-amd64-zyui:/srv# getent passwd kruemel
kruemel:x:1001:1000:Monster,,,:/home/kruemel:/bin/bash
root@fan-sid-buildd-amd64-zyui:/srv# getent group keks
keks:x:1000:kruemel
root@fan-sid-buildd-amd64-zyui:/srv# deluser kruemel
deluser: `/usr/bin/crontab' not executed. Skipping crontab removal. Package `cron' required.
Removing user `kruemel' ...
Done.
root@fan-sid-buildd-amd64-zyui:/srv# getent passwd kruemel
root@fan-sid-buildd-amd64-zyui:/srv# getent group keks
keks:x:1000:
root@fan-sid-buildd-amd64-zyui:/srv#
If I have guessed wrong, I need to know what a "main group" is.
On Wed, Nov 23, 2011 at 01:12:09PM +0100, Milan Bouchet-Valat wrote:
> "Warning: group X is now empty."
> should be fixed, as it is clearly wrong. This warning should be printed
> when the group *is not* removed ; and when the group is removed, deluser
> would better say:
> "Empty group X has been automatically deleted."
The adduser code does not contain the string "is now empty". It was
either removed over the last eleven years, or it originates from the
low-level tools from the passwd package, like useradd, userdel etc. We
probably cannot do much about this inside adduser.
I would like to have this bug closed, but the fix is not goingt to make
it into bookworm. If I dont get response for this mail by the end of
June 2023 (which is half a year in the future now), I will close this
bug report.
Greetings
Marc
Added tag(s) moreinfo.
Request was from Marc Haber <mh+debian-packages@zugschlus.de>
to 545714-submit@bugs.debian.org.
(Wed, 07 Dec 2022 18:21:03 GMT) (full text, mbox, link).
Message sent on
to Milan Bouchet-Valat <nalimilan@club.fr>:
Bug#545714.
(Wed, 07 Dec 2022 18:21: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:06:38 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.