GROUP(4) — HP-UX
NAME
group − group file, grp.h
DESCRIPTION
Group contains for each group the following information:
group name
encrypted password
numerical group ID
comma-separated list of all users allowed in the group
This is an ASCII file. The fields are separated by colons; each group is separated from the next by a new-line. No spaces should separate the fields or parts of fields on any line. If the password field is null, no password is associated with the group.
There are two files of this form in the system, /etc/group and /etc/logingroup. The file /etc/group exists to supply names for each group, and to support changing groups via newgrp(1). /etc/logingroup provides a default group access list for each user via login(1) and initgroups(3C).
The real and effective group ID set up by login for each user is defined in /etc/passwd (see passwd(4). If /etc/logingroup is empty or non-existent, the default group access list is empty. If /etc/logingroup and /etc/group are links to the same file, the default access list includes the entire set of groups associated with the user. The group name and password fields in /etc/logingroup are never used; they are included only to give the two files a uniform format, allowing them to be linked together.
All group ID’s used in /etc/logingroup or /etc/passwd should be defined in /etc/group. No user should be associated with more than NGROUPS (see setgroups(2)) groups in /etc/logingroup.
These files reside in directory /etc. Because of the encrypted passwords, they can and do have general read permission and can be used, for example, to map numerical group ID’s to names.
Grp.h describes the group structure returned by getgrent(3C), etc:
/* see getgrent(3C) */
structgroup {
char*gr_name;
char*gr_passwd;
intgr_gid;
char**gr_mem;
};
NETWORKING FEATURES
NFS
The /etc/group file can have a line beginning with a plus (+), which means to incorporate entries from the yellow pages. There are two styles of + entries: + means to insert the entire contents of the yellow pages group file at that point, and +name means to insert the entry (if any) for name from the yellow pages at that point. If a + entry has a non-null password or group member field, the contents of that field will overide what is contained in the yellow pages. The numerical group ID field cannot be overridden.
A group file can also have a line beginning with a minus (-), these entries are used to disallow group entries. There is only one style of - entries: An entry that consists of -name means to disallow any subsequent entry (if any) for name. These entries will be disallowed regardless of whether the subsequent entry comes from the yellow pages or the local group file.
WARNINGS
The gid 9 is reserved for the Pascal Language operating system and the BASIC Language operating system. These are operating systems for the Series 300 computers that can co-exist with HP-UX on the same disk. Using this gid for other purposes can inhibit file transfer and sharing.
DEPENDENCIES
NFS
EXAMPLES
Here is a sample /etc/group file:
other:*:1:root,daemon,uucp,who,date,sync
-oldproj
bin:*:2:root,bin,daemon,lp
+myproject:::bill,steve
+:
The group other will have a gid of 1 and members root, daemon, uucp, who, date, and sync. The group oldproj will be ignored since it appears after the entry -oldproj. Also, the group myproject will have members bill and steve, and the password and group ID of the yellow pages entry for the group myproject. All the groups listed in the yellow pages will be pulled in and placed after the entry for myproject.
WARNINGS
The plus (+) and minus (-) features are part of NFS. Therefore if NFS is not installed, these features will not work.
FILES
/etc/group
/etc/logingroup
SEE ALSO
groups(1), newgrp(1), passwd(1), setgroups(2), crypt(3C), getgrent(3C), initgroups(3C), passwd(4).
BUGS
There is no tool that helps you ensure that /etc/passwd, /etc/group, and /etc/logingroup are compatible.
There is no tool that helps you set group passwords in /etc/group.
Hewlett-Packard Company — Version B.1, May 11, 2021