Red Hat Bugzilla – Bug 78620
deleting a user fails to remove the default group entry that is added by default
Last modified: 2008-05-01 11:38:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830
Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Delete a user that no longer needs an account using the redhat-config-users
Actual Results: User entry in the passwd and shadow files are removed.
Expected Results: User entry in the passwd and shadow files are removed. The
entry that is created by default (if groupid == userid, then remove groupid)
should also be removed.
$ rpm -qf `which redhat-config-users`
*** This bug has been marked as a duplicate of 78619 ***
Well, I can't delete the group automatically because it may have other users in
it, and it would be wrong to delete a group that other users belong to.
So here's what I did. When you select a user to delete, we look at that user's
primary group. If that user is the only member of that group, we pop up a
dialog offering to delete the group as well. The user can say yes or no.
If there are group members other than the one selected for deletion, we do not
show the dialog to delete the group. I think this is a reasonable way to solve
it. Can you think of anything wrong with this? If so, please reopen this bug.
If not, please test with redhat-config-users-1.1.1-9 in Rawhide (should appear
QA, please verify.
dialog verified in redhat-config-users-1.1.2-2.
verified that groups are deleted/remain as appropriate
verified that dialog does not appear when group is not private
*However note that when group is not private the remove home directory dialog is
I propose this feature be merged with the other user delete options.
Please see bug#69712
Actually, I've changed this behavior again. If the user's primary group has
only one user in it, we will delete the group automatically. This makes sense
because the user will almost always want to delete the group associated with
that user. If they recreate the user, the group will also be recreated.
Please test with redhat-config-users-1.1.3-3.
This change breaks the tool in the following scenario:
1) Create a user and opt not to create a group for the user (the user will be
assigned to the group 'users').
2) Delete the user that you have just created. Since this user is the only
member of the group users, that group is deleted.
3) Now try to create another user without creating a group (as in step 1). The
dialog window locks up with the waiting cursor and a traceback appears on
In general this practice of autodeleting the group is not right, what if user_a
happens to be the only member of an important system group like floppy or disk?
At the very least, you need to exclude groups <500, and possibly only do the
autodelete thing when the name_of_group=name_of_user (or both restrictions).
Better yet, implement my suggestion from bug#69712.
Here is the traceback I mentioned.
Traceback (most recent call last):
File "/usr/share/redhat-config-users/userWindow.py", line 315, in
File "/usr/share/redhat-config-users/userWindow.py", line 332, in addToUsersGroup
cn = groupEnt.get(libuser.GROUPNAME)
AttributeError: 'NoneType' object has no attribute 'get'
Ok, should be fixed in 1.1.5-8. It will no longer automatically delete groups
with gid < 500. Built in dist-10
There is a stack of 64 bugs that have been in Modified state for a long period
of time. I am closing these as Rawhide now. If you find that the issue is not
fixed, please reopen this report.
*** Bug 98911 has been marked as a duplicate of this bug. ***