kully@mva.cs.liv.ac.uk (04/27/89)
I seem to get groups working on my ST minix. My group file looks like.. root::0:root daemon::1:daemon bin::2:bin usr:3:ast,mark,saad It recognises ast as being in group use, but not mark and saad, why? Mark Powell
mju@mudos.ann-arbor.mi.us (Marc Unangst) (04/29/89)
In article <4658@mva.cs.liv.ac.uk>, kully@mva.cs.liv.ac.uk writes: >I seem to get groups working on my ST minix. My group file looks like.. > >root::0:root >daemon::1:daemon >bin::2:bin >usr:3:ast,mark,saad > >It recognises ast as being in group use, but not mark and saad, why? I think you misunderstand the format of the /etc/group file: group:password:gid:members,more-members,even-more-members To make user ast a member of groups usr, mark, and saad, you would do this: root::0:root daemon::1:daemon bin::2:bin usr::3:ast mark::4:ast saad::5:ast Note that if a user is only in one group, they do NOT have to be listed in the user field of their /etc/group group; they just have to have the proper gid in the gid field of /etc/passwd. The /etc/group file is only used to link group names to gids, and to specify the groups that a user can newgrp to. If ast's /etc/passwd entry said he was in group 3 (usr) and he wanted to change groups to mark, he would type "newgrp mark". His gid would be changed to 4 for the remainder of his login session, or until he changes groups again. Note that newgrp may have to be SUID root for it to work correctly. (In fact, I'm sure of it.) This explanation is valid for SysIII and SysV. V7 may do things differently, so your milage may vary. -- Marc Unangst UUCP smart : mju@mudos.ann-arbor.mi.us UUCP dumb : ...!uunet!sharkey!mudos!mju UUCP dumb alt.: ...!{ames,rutgers}!mailrus!clip!mudos!mju Internet : mju%mudos@cardiology.ummc.umich.edu