Red Hat Bugzilla – Bug 167687
userdel allocate all system memory and then fail
Last modified: 2007-11-30 17:07:20 EST
In some cases 'userdel -r' allocate infinite amount of memory and then fail.
This is long standing bug as I saw this behavior years ago so I think it is not
introduced by recent patches.
# userdel -r kp &
# ps xaumOT | grep userde[l] (repeated)
root 20333 28.0 39.6 450484 406740 pts/1 - 09:34 0:06 userdel -r kp
root 20333 27.7 45.8 513536 469840 pts/1 - 09:34 0:07 userdel -r kp
root 20333 27.9 51.0 567848 524064 pts/1 - 09:34 0:08 userdel -r kp
Created attachment 118542 [details]
strace of infinite loop in 'userdel -r kp'
The bug does not depend on '-r' switch.
Hm. When I manually deleted this user I found that there was no record in the
/etc/gshadow file. Maybe this was lost when the system has been moved to another
machine or so.
I can't reproduce it.
I deleted(userdel) user foo after group foo had been removed from /etc/gshadow
and I got "userdel: error removing shadow group entry" but user foo was removed
Did u have two lines begining with same group name in /etc/group?
"$userdel user4" spin in infinite loop now.