From owner-freebsd-questions Thu Dec 11 21:44:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA20275 for questions-outgoing; Thu, 11 Dec 1997 21:44:12 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from ns1.ukdw.ac.id ([202.155.16.68]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA20261 for ; Thu, 11 Dec 1997 21:44:01 -0800 (PST) (envelope-from hendra@ns1.ukdw.ac.id) Received: from localhost (hendra@localhost) by ns1.ukdw.ac.id (8.8.7/8.8.7) with SMTP id MAA04831 for ; Fri, 12 Dec 1997 12:43:49 +0700 (JAVT) (envelope-from hendra@ns1.ukdw.ac.id) Date: Fri, 12 Dec 1997 12:43:48 +0700 (JAVT) From: Hendra Sentono To: questions@freebsd.org Subject: Differences on being a member of groups Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I'm not currently subscribing this mailing list, so please send your suggestions to my e-mail address. My question is: - What are differences between being a member of a group and being invited on another group? I have to know this because I've tried to add users automatically by making a little perl script that can read a file with users id in it. Because I use system(adduser -batch $loginname $group $class $fullname $passwd); in my script, the adduser script automatically create group with the same name as user names I've created. I have organized user to become a member of a group (by inviting them to the group I've decided), and I don't want there exists groups with the same name as user names, so I put another line in my script: system(rmgroup $loginname); This script causes the /etc/group file like this: groupfoo1:*:110:user1,user2,user3,user4 groupfoo2:*:111:user5,user6,user7,user8 and deleting the lines (that created automatically before) user1:*:1500: user2:*:1501: ... But when I do vipw, the users lines show that they still being a member of the group I've deleted. user1:$1$passwd:1500:1500::0:0:user full name:/usr/home/user1:usrsh Is this OK or are there any consequences for this case? Do I have to edit by 'vipw'-ing and editing users' groupids? Which one is better: - my steps I've described, or - editing $defaultgroup in /etc/adduser.conf and adding user group by group (so there won't be any groups with same name as user names and not necessarily doing rmgroup) Thanks in advance. -=Hendra=- Internet Development Staff and Student of Duta Wacana Christian University Yogyakarta, Indonesia. Visit my university site http://www.ukdw.ac.id/