0

I'm creating user with group in my busybox Linux machine

addgroup group1
adduser user1 -G group1

after creating 20 users I'm getting error like "adduser: unknown group group1",

cat /etc/group
group1:x:1002:user1,user2,user3,user4,user5,user6,user7,user8,user9,user10,user11,user12,user13,user14,user15,user16,user17,user18,user19,user20

So is there any limit of adding member list in /etc/group?

ekad
  • 14,436
  • 26
  • 44
  • 46
Rahul R Dhobi
  • 5,668
  • 1
  • 29
  • 38
  • 1
    for the record there is a hardcoded limit in busybox "libpwdgrp/pwd_grp.c" So you could patch busybox or uclib (it depends on your system) to extend the line buffer length the issue has been reported here http://bugs.alpinelinux.org/issues/733 – hostmaster Feb 05 '14 at 11:15

1 Answers1

0

Which Linux distribution do you actually use ? adduser has a different syntax at least in Ubuntu/Debian by the way I've just made group with 200 user without problem

for i in `seq 1 100`; do echo adduser -G group1 "user$i"|| break ; done

So it seems to me problem is in another place.

hostmaster
  • 1,822
  • 16
  • 17