NAME
CfgTie::TieShadow -- an associative array of user names to password information
SYNOPSIS
makes the shadow database available as a regular hash
DESCRIPTION
This is a straight forward HASH tie that allows us to access the shadow password database sanely.
Ties
This tie is available for programers:
tie %shadow,'CfgTie::TieShadow'
$shadow{$name}
will return a HASH reference of the named shadow information
Structure of hash
Any given shadow entry has the following information assoicated with it (the keys are case insensitive):
Name
-
Login name
Password
-
The encrypted password
Last
-
Last time it was changed
Min
-
The minimum number of days before a change is allow
Max
-
Maximum number of days before a change in passowrds is required
Warn
-
The number of days before expiration that they will receive a warning
Inactive
-
The number of days before an account is inactive
Expires
-
The date the account expires on
Inactive
-
The 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 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::TieShadow'status()
&CfgTie::TieShadow_id'status()
-
Will return
stat
information on the shadow database.
Miscellaneous
$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.
Files
/etc/passwd /etc/group /etc/shadow
See Also
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)
Cavaets
The current version does cache some shadow information
Author
Randall Maas (randym@acm.org)