Passwd::Unix

Provides an abstract interface to /etc/passwd, /etc/shadow and /etc/group format files
Download

Passwd::Unix Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Strzelecki Lukasz
  • Publisher web site:
  • http://search.cpan.org/~strzelec/

Passwd::Unix Tags


Passwd::Unix Description

Provides an abstract interface to /etc/passwd, /etc/shadow and /etc/group format files Passwd::Unix is a Perl module that provides an abstract interface to /etc/passwd, /etc/shadow and /etc/group format files. It is inspired by Unix::PasswdFile module (that one does not handle /etc/shadow file, what is necessary in modern systems like Sun Solaris 10 or Linux).SYNOPSIS use Passwd::Unix; my $pu = Passwd::Unix->new(); my $err = $pu->user("example", $pu->encpass("my_secret"), $pu->maxuid + 1, 10, "My User", "/home/example", "/bin/bash" ); $pu->passwd("example", $pu->encpass("newsecret")); foreach my $user ($pu->users) { print "Username: $user\nFull Name: ", $pu->gecos($user), "\n\n"; } my $uid = $pu->uid('example'); $pu->del("example"); # or use Passwd::Unix qw(check_sanity reset encpass passwd_file shadow_file group_file backup warnings del del_user uid gid gecos home shell passwd rename maxgid maxuid exists_user exists_group user users users_from_shadow del_group group groups groups_from_gshadow); my $err = user( "example", encpass("my_secret"), $pu->maxuid + 1, 10, "My User", "/home/example", "/bin/bash" ); passwd("example",encpass("newsecret")); foreach my $user (users()) { print "Username: $user\nFull Name: ", gecos($user), "\n\n"; } my $uid = uid('example'); del("example"); Requirements: · Perl


Passwd::Unix Related Software