NAME
CfgTie::TieShadow -- an associative array of user names to password information
SYNOPSIS
This module makes the shadow database available as a regular hash.
DESCRIPTION
This is a straightforward hash tie that allows us to access the shadow password database sanely.
Ties
This tie is available for programmers:
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 associated 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 allowed
Max
-
Maximum number of days before a change in passwords 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 in the overall system. Additionally, the programmer can set any other associated key, but this information will only available to the 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
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)
Caveats
The current version does cache some shadow information.
Author
Randall Maas (randym@acm.org)