Whilst adding 2023 users using the shadow-utils application
I told it to add each of the users to the groups user and
i.e. adduser -G user,stud a123456
The problem is that in the group file the adduser utility
had added a large number of the users correctly i.e.
but then I noticed that the rest of the users has been added
in the following format
and so on. The line for stud goes accross to column 8226
I can provide a full example if it is required
Also the "newusers" command adds users to the group file.
is this *normal* I have not seen this on other UNIX versions and some
utilitys will choke on the group file when written this way.
------- Email Received From Lee Cashmore <email@example.com> 03/01/99 04:46 -------
------- Email Received From Lee Cashmore <firstname.lastname@example.org> 03/10/99 06:59 -------
I was unable to replicate this bug using the shadow-utils-980403-8
I used newuser to add a long text file of user lines and I was unable
to get this to fail as specified. I also created a home directory with
proper group ownerships and was able to create files with all members
of the group. I added several hundred members to a single group and
the lines were not broken as specified.
This bug appears to be fixed with the newest version of shadow utils
tha tis in 5.9This bug appears to be fixed with the newest version of shadow utils
tha tis in 5.9
------- Email Received From Lee Cashmore <email@example.com> 03/26/99 18:48 -------
Well, I'm still seeing the same problem when I recompile the SRPM of
shadow-utils from RH 6.0 on a RH 5.2 machine and install the resulting
Interestingly, the long group lines are truncated after precisely 8192
characters, which is a sure sign that a constant somewhere needs to be
Looking through the source, I came across commonio.c, which seems to
contain the offending piece of code. I tried applying the following
--- shadow-980403.orig/lib/commonio.c Thu Apr 2 23:51:40 1998
+++ shadow-980403/lib/commonio.c Thu Apr 29 15:11:28 1999
@@ -382,7 +382,7 @@
commonio_open(struct commonio_db *db, int mode)
- char buf;
+ char buf;
struct commonio_entry *p;
Unfortunately, the resulting useradd segfaulted when adding a new
I'm not a C programmer, so I can't fix this problem. Maybe I was
barking up completely the wrong tree, anyway.
Can anyone else provide the code necessary to allow useradd to handle
group lines with more than 8192 characters?
It's a real shame this bug isn't fixed after 4 years in Red Hat Linux 8.0 :(
Check out my comments on bug 60304...