Description of problem: useradd segfaults while adding user when a large group already exists. Version-Release number of selected component (if applicable): shadow-utils-4.0.3-6 How reproducible: Always. Steps to Reproduce: 1. Make a very large group. 2. Add users, also adding them to the large group. 3. useradd eventually dies when there are too many member of the group. Actual results: # /usr/sbin/useradd -u 1440072 -g 1440072 -d /dev/null -s /bin/false aluit32 Segmentation fault The end of a trace done with "strace -f": read(8, ",s116518,s116519,s116520,s116521"..., 4096) = 4096 read(8, ",s117249,s117250,s117252,s117253"..., 4096) = 4096 read(8, "s100673,s100681,s100683,s100687,"..., 4096) = 4096 brk(0) = 0x8440000 brk(0x8444000) = 0x8444000 read(8, "s109058,s109060,s109061,s109064,"..., 4096) = 4096 brk(0) = 0x8444000 brk(0x8449000) = 0x8449000 read(8, "s116530,s116531,s116533,s116534,"..., 4096) = 4096 read(8, "s117270,s117271,s117272,s117273,"..., 4096) = 4096 brk(0) = 0x8449000 brk(0x844c000) = 0x844c000 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Expected results: The user should have been created. Additional info: The machine is to be a Samba PDC for a large student network.
Created attachment 90895 [details] A small shell-script that illustrates the problem On a freshly installed test machine running RH 9 and shadow-utils-4.0.3-6 the output of this script crashes groupadd/groupdel after adding 2057 users. The only way to recover is to edit passwd, shadow, group, gshadow by hand, shadow-utils does not handle this case at all.