class Inspec::Resources::Shadow

def parse_shadow_line(line)

Returns:
  • (Hash) - Map of entries in this line

Parameters:
  • line (String) -- a line of /etc/shadow
def parse_shadow_line(line)
  x = line.split(':')
  {
    'user'          => x.at(0),
    'password'      => x.at(1),
    'last_change'   => x.at(2),
    'min_days'      => x.at(3),
    'max_days'      => x.at(4),
    'warn_days'     => x.at(5),
    'inactive_days' => x.at(6),
    'expiry_date'   => x.at(7),
    'reserved'      => x.at(8),
  }
end