
CfgTie::TieGroup -- an associative array of group names and ids to information

Makes the groups database available as regular hash
tie %group,'CfgTie::TieGroup'
$group{'myfriends'}=['jonj', @{$group{'myfriends'}];
or
tie %group,'CfgTie::TieGroup', 'mygroupfile'

This is a straight forward hash tie that allows us to access the user group database sanely.
It cross ties with the user package and the mail packages
There are two ties available for programmers:
tie %group,'CfgTie::TieGroup'$group{$name} will return a hash reference of the named group information.
tie %group_id,'CfgTie::Group_id'$group_id{$id} will return a HASH reference for the specified group.
Any given group entry has the following information assoicated with it:
nameidmembersA list reference to all of the users that are part of this group.
_membersA list reference to all of the users that are explicitly listed in the /etc/group file.
Plus an (probably) obsolete fields:
PasswordThis is the encrypted password, but will probably be obsolete.
Each of these entries can be modified (even deleted), and they will be reflected in the overall system. Additionally, the programmer can set any other associated key, but this information will only be available to a running Perl script.
(tied %MyHash)-files()>Returns a list of files employed.
&CfgTie::TieGroup'status()&CfgTie::TieGroup_id'status()Will return stat information on the group database.
$CfgTie::TieGroup_rec'groupmod contains the path to the program groupmod. This can be modified as required.
$CfgTie::TieGroup_rec'groupadd contains the path to the program groupadd. This can be modified as required.
$CfgTie::TieGroup_rec'groupdel contains the path to the program groupdel. This can be modified as required.

/etc/passwd /etc/group /etc/gshadow /etc/shadow

CfgTie::Cfgfile, CfgTie::TieAliases, CfgTie::TieGeneric, CfgTie::TieHost, CfgTie::TieMTab, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieRCService, CfgTie::TieRsrc, CfgTie::TieServ, CfgTie::TieShadow, CfgTie::TieUser
group(5), passwd(5), shadow(5), groupmod(8), groupadd(8), groupdel(8)

The current version does cache some group information.

Randall Maas (mailto:randym@acm.org, http://www.hamline.edu/~rcmaas/)