Milan Bouchet-Valat
2009-Sep-08 17:19 UTC
Bug#545714: deluser does not remove empty main group when the suer is member of it
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!