
CfgTie::TieShadow -- an associative array of user names to password information

This module makes the shadow database available as a regular hash.

This is a straightforward hash tie that allows us to access the shadow password database sanely.
This tie is available for programmers:
tie %shadow,'CfgTie::TieShadow'
$shadow{$name} will return a hash reference of the named shadow information
Any given shadow entry has the following information associated with it (the keys are case-insensitive):
NameLogin name
PasswordThe encrypted password
LastLast time it was changed
MinThe minimum number of days before a change is allowed
MaxMaximum number of days before a change in passwords is required
WarnThe number of days before expiration that they will receive a warning
InactiveThe number of days before an account is inactive
ExpiresThe date the account expires on
InactiveThe number of days after a password expires that the account is considered inactive and expires
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 available to the running Perl script.
&CfgTie::TieShadow'status()&CfgTie::TieShadow_id'status()Will return stat information on the shadow database.
$CfgTie::Tiehadow_rec'usermod contains the path to the program usermod.
This can be modified as required.
$CfgTie::TieShadow_rec'useradd contains the path to the program useradd.
This can be modified as required.
$CfgTie::TieShadow_rec'userdel contains the path to the program userdel.
This can be modified as required.

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

CfgTie::Cfgfile, CfgTie::TieAliases, CfgTie::TieGeneric, CfgTie::TieGroup, CfgTie::TieHost, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieServ, CfgTie::TieShadow, CfgTie::TieUser
group(5), passwd(5), shadow(5), usermod(8), useradd(8), userdel(8)

The current version does cache some shadow information.

Randall Maas (randym@acm.org)