Bug 1916

Summary: userdel doesn't delete user private group any more
Product: [Retired] Red Hat Linux Reporter: Michael K. Johnson <johnsonm>
Component: shadow-utilsAssignee: Jay Turner <jturner>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-04-01 04:18:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Michael K. Johnson 1999-03-31 16:05:23 UTC
userdel used to delete user private groups if they had
the same name as the user, but it does not seem to do
that now.

Comment 1 Cristian Gafton 1999-03-31 16:33:59 UTC
I don't think it ever used to do that. That is what groupdel does.

Comment 2 Michael K. Johnson 1999-03-31 16:39:59 UTC
useradd adds user private groups.  userdel should delete them.
groupadd adds other groups.  groupdel should be used to delete
those.  But automagically added groups should be automagically
deleted.

If userdel never did that (I'll have to check) then it is a bug,
as we agreed long ago that it should...

Comment 3 Michael K. Johnson 1999-03-31 19:38:59 UTC
useradd adds user private groups.  userdel should delete them.
groupadd adds other groups.  groupdel should be used to delete
those.  But automagically added groups should be automagically
deleted.

If userdel never did that (I'll have to check) then it is a bug,
as we agreed long ago that it should...

Comment 4 Michael K. Johnson 1999-03-31 19:42:59 UTC
OK, userdel needs to have a command-line option to call groupdel
(it currently doesn't seem to)

Comment 5 Preston Brown 1999-03-31 22:31:59 UTC
michael, can you handle this?

Comment 6 Michael K. Johnson 1999-04-01 04:18:59 UTC
Fixed in shadow-utils-980403-9
userdel now removes the user's primary group IFF
 o the group name and and the user name are the same
 o no other user has the same primary group id
 o no other users are listed in the group list for the primary group