NAME

Parse::Passwd - parse Unix passwd files

SYNOPSIS

use Parse::Passwd;

my $p = Parse::Passwd->file;

use Data::Dumper; print Dumper($p);

# OUTPUT

$VAR1 = [
        {
          'login_shell' => undef,
          'uid' => '0',
          'fullname' => '/',
          'gid' => '0',
          'home_dir' => '/sbin/sh',
          'username,' => 'root',
          'password,' => 'x',
          'gcos_field' => 'Super-User'
        },
        {
          'login_shell' => undef,
          'uid' => 2026,
          'fullname' => '/export/home/collinss',
          'gid' => 141,
          'home_dir' => '/usr/bin/bash ',
          'username,' => 'collinss',
          'password,' => 'x',
          'gcos_field' => 'Sam Collins - Standard User'
        },
        {
          'login_shell' => undef,
          'uid' => 2027,
          'fullname' => '/export/home/wintili',
          'gid' => 141,
          'home_dir' => '/usr/bin/bash ',
          'username,' => 'wintili',
          'password,' => 'x',
          'gcos_field' => 'Will Intel - Basic user'
        },
   ];

DESCRIPTION

This is a lightweight alternative to Unix::PasswdFile.

METHODS

->file ( [ $file ] )

The class method file optionally takes one file argument to change the location of the passwd file.

AUTHOR

T. M. Brannon, <tbone@cpan.org>

SEE ALSO

Unix::PasswdFile.