Matt <net> wrote:
Hmm... I don't know of one. Seems like there should be some such
Except for the "days of inactivity" (which I'm not sure where that's
stored), you could manually calculate "expiration" and "max passwd days"
and display them.
This *might* work (no guarantees, and I'm worried that the date
calculation may be off-by-one).
my $epoch_days = int(time / (60 * 60 * 24));
open(SHADOW, "/etc/shadow") or die "Cannot open shadow file. $!\n";
my line = split('\:');
if ($line ne "" and $epoch_days > ($line + 0))
print "Account $line has expired.\n";
if ($line ne "" and $line ne "" and
$epoch_days > ($line + $line))
print "Account $line has exceeded the time to change
Darren Dunham com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >