

group                      File Format                      group




Group file format


The  group file  /etc/group describes the  user groups  that have
been defined on your  COHERENT system.  This allows users to con-
trol  the access  that  members of  their group  have to  certain
files.   /etc/group contains  the  information to  map any  ASCII
group name  to the corresponding numerical  group identifier, and
vice versa.  It also contains, in ASCII, the names of the members
of each  group.  This information  is used by,  among others, the
command newgrp.

Each  group has  an entry  in  the file  /etc/group one  line per
entry.  Each line  consists of four colon-separated ASCII fields,
as follows:


     _g_r_o_u_p__n_a_m_e : _p_a_s_s_w_o_r_d : _g_r_o_u_p__n_u_m_b_e_r : _m_e_m_b_e_r[,_m_e_m_b_e_r...]


Passwords are  encrypted with crypt, so the  group file is gener-
ally readable.

The  COHERENT  system  has  five  system  calls  that  manipulate
/etc/group, as follows:

eennddggrreenntt
     Close /etc/group.

ggeettggrreenntt
     Return the next entry from /etc/group.

ggeettggrrnnaamm
     Return the first entry with a given group name.

ggeettggrrggiidd
     Return the first entry with a given group identifier.

sseettggrreenntt
     Rewind /etc/group, so that searches can begin again from the
     beginning of the file.

The calls  getgrent, getgrid, and getgrnam  each return a pointer
to structure group, which is  defined in the header file grp.h as
follows:


struct group {
        char    *gr_name;       /* Group name */
        char    *gr_passwd;     /* Group password */
        int     gr_gid;         /* Numeric group id */
        char    **gr_mem;       /* Group members */
};



COHERENT Lexicon                                           Page 1




group                      File Format                      group




***** Files *****

/etc/group

***** See Also *****

chgrp(),   crypt(),   endgrent(),   file   formats,   getgrent(),
getgrgid(), getgrnam(), grp.h, newgrp, passwd, setgrend()

***** Notes *****

At present  the group password  field cannot be  set directly (no
command similar to passwd exists for groups).  One alternative is
to set the  password in the /etc/passwd file for  a user with the
passwd command,  and then transcribe the  password into the group
file manually.








































COHERENT Lexicon                                           Page 2


