Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 1997 12:43:48 +0700 (JAVT)
From:      Hendra Sentono <hendra@ns1.ukdw.ac.id>
To:        questions@freebsd.org
Subject:   Differences on being a member of groups
Message-ID:  <Pine.BSF.3.96.971212121540.4783B-100000@ns1.ukdw.ac.id>

next in thread | raw e-mail | index | archive | help
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/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971212121540.4783B-100000>