NAME

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

SYNOPSIS

Makes the groups database available as regular hash

tie %group,'CfgTie::TieGroup'
$group{'myfriends'}=['jonj', @{$group{'myfriends'}];

DESCRIPTION

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

Ties

There are two ties available for programers:

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.

Structure of hash

Any given group entry has the following information assoicated with it:

Name
Id
Members

A list reference of the users...

Plus an (probably) obsolete fields:

Password

This is the encrypted password, but will probably be obsolete

Each of these entries can be modified (even deleted), and they will be reflected into the overall system. Additionally, the programmer can set any other associated key, but this information will only available to running PERL script.

Additional Routines

&CfgTie:TieGroup'status()
&CfgTie::TieGroup_id'status()

Will return stat information on the group database.

Miscellaneous

$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.

Files

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

See Also

Cfgfile, RCService, CfgTie::TieAliases, CfgTie::TieGeneric, CfgTie::TieHost, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieServ, CfgTie::TieShadow, CfgTie::TieUser

group(5), passwd(5), shadow(5), groupmod(8), groupadd(8), groupdel(8)

Cavaets

The current version does cache some group information

Author

Randall Maas (randym@acm.org)