From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96720414501860.tru64-unix-managers.marc@archive.invalid> From: Jacques Maleyrot Date: Fri, 25 Aug 2000 11:51:48 +0000 To: tru64-unix-managers Subject: SUMMARY: adduser and group file X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96720414501860 Thanks to Ann Majeske from Compaq. I give his response below: "" There is some confusion about what the maximum line length in /etc/group should be, and how to handle it (I.e. break long lines into multiple lines with the same name and gid or break long lines into multiple lines with different names and the same gid). I don't know the current "official" limit, but some commands and utilities may have lower limits than others. (Most now "malloc" the needed memory so they have no limit.) The "hardest" limit I know of is for the NIS group map. I think that limit is around 1024 characters and has to do with the database used. Since you aren't using NIS, you don't have to worry about that one. There is no OS problem with multiple lines in the /etc/group file with the same name and gid, or different names with the same gid. I.e. with /etc/group containing groupa:*:222:user1,user2 groupa:*:222:user3,user4 groupb:*:222:user5,user6 the OS will consider users user1, user2, user3, user4, user5, and user6 to all be in the same group. Some commands and utilities may still get confused with one or the other way of splitting the group into multiple lines, but those problems are strictly cosmetic. (For instance, if user5 issues the "groups" command, it will probably show that he's a member of "groupa", not "groupb".) The simple answer is that you shouldn't worry about having multiple lines with the same group name and gid, the system will work just fine. "" original message was : ------------------- My /etc/group looks like : .... group1:*:100: group2:*:101:users1, user2 .................... .... usern group2:*:101: usern+1, usern+2 group4:*:103: userx So some group lines are limited to about 256 characters. I read in archives and in admin book that maximum line lengh in /etc/group is LINE_MAX define in limits.h. In limits.h : .. # define LINE_MAX _POSIX2_LINE_MAX ... # define _POSIX2_LINE_MAX 2048 If i consider 2048 / 8 = 256 each line is limited to 256 characters OK. But i have some lines in /etc/group with same group name and same gid. It seems that this don't get any trouble in running OS; But i thaught it was impossible having many lines with same group name and same gid. -- Jacques Maleyrot Universite de Bourgogne Centre de Ressources Informatiques BP 27877 21078 DIJON Cedex Email: Jacques.Maleyrot@mail.u-bourgogne.fr tel : (33) 380395205 Fax: (33) 380395269