Whilst adding 2023 users using the shadow-utils application adduser I told it to add each of the users to the groups user and stud. 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. stud::502:a1,a2,a3,a4,a5,a6,a7,a8,a9 but then I noticed that the rest of the users has been added in the following format stud::502:a1,a2,a3,a4,a5,a6,a7,a8,a9 ,a10 ,a11 ,a12 ,a13 ,a14 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 <leec.ac.uk> 03/01/99 04:46 ------- ------- Email Received From Lee Cashmore <leec.ac.uk> 03/10/99 06:59 -------
I was unable to replicate this bug using the shadow-utils-980403-8 package. 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 <leec.ac.uk> 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 binary. Interestingly, the long group lines are truncated after precisely 8192 characters, which is a sure sign that a constant somewhere needs to be increased. Looking through the source, I came across commonio.c, which seems to contain the offending piece of code. I tried applying the following patch: --- 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 @@ int commonio_open(struct commonio_db *db, int mode) { - char buf[8192]; + char buf[32768]; char *cp; char *line; struct commonio_entry *p; Unfortunately, the resulting useradd segfaulted when adding a new user. 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...