Common HEP UNIX User Environment - Group name determination


Setting of the problem

Let's assume that you belong to several groups and sometimes you need the environment of one group and in other circumstances you need the environment of another group. In UNIX, there is the notion of primary group and once you logged in, your group id is set to that of the primary group. The HEPiX scripts provide you with a way of specifying the group name from which you want to get the environment using a file

	$HOME/.hepix/preferred-group
In this file you simply enter the name of the group that you want.

Example

I belong to groups c3, c4 and c5. On the system plus1, my primary group is c3 but I want to inherit the environment of group c5. Then, I simply edit the file $HOME/.hepix/preferred-group and I enter c5 in the first line.

Thus, the next time that I login, I will get the environment of group c5.

Limitations

For instance this mechanism doesn't allow you to specify that you would like to inherit the environment from a group 1 on a service A and from a group 2 on a service A. Thus when you set a preferred group it is set for all the accounts on which you are using this home directory. If for example you have an AFS account and you set a preferred group, then it will be used on all the services on which you are using your AFS Home directory.

Full Behaviour

If you have no such file, the system tries to determine your group name based on the output of the id command. Of course this requires that /etc/group or its NIS equivalent is correctly updated.


Arnaud Taddei, 27-Jun-1996