Unix::Login

Unix::Login is a Perl module that offers a customizable Unix login prompt and validation.
Download

Unix::Login Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Nathan Wiger
  • Publisher web site:
  • http://search.cpan.org/~nwiger/Unix-Login-1.08/Login.pm

Unix::Login Tags


Unix::Login Description

Unix::Login is a Perl module that offers a customizable Unix login prompt and validation. Unix::Login is a Perl module that offers a customizable Unix login prompt and validation.SYNOPSIS use Unix::Login; # This will return the same thing as getpwnam() on # success, or will die automatically on failure my @pw = login;This is a simple yet flexible module that provides a Unix-esque login prompt w/ password validation. This is useful in custom applications that need to validate the username/password of the person using the app.The above example is pretty much all you'll ever need (and all this module provides). Here are some specifics on the function provided:login(option => value, option => value)This prompts for the username and password and tries to validate the login. On success, it returns the same thing that getpwuid() does: the username in a scalar context, or the passwd struct as an array in a list context. It returns undef on failure.You can pass it an optional set of parameters. These will specify options for that login prompt only. The parameters and their default values are: attempts Max login attempts failmesg Print this on failure failsleep And sleep for this many seconds failexit If can't login after (3) attempts, exit fatally banner Banner printed once up top bannerfile File to print after banner (i.e. /etc/issue) [] login Prompt asking for username password Prompt asking for password sameuser Take username from process? passreq Require a password for all users? nohomemesg Printed if no homedir stripspaces Strip spaces from username? setenv If true, setup HOME and other %ENV variables clearenv If true, first undef %ENV before setenv path If setenv, set PATH to this for non-root supath If setenv, set PATH to this for root maildir If setenv, set MAIL to this dir/username input Where to read input from filehandle output Where to write output to filehandle pwent Return a User::pwent struct in scalar context? cdhome Chdir to the person's homedir on success? execshell Execute the person's shell as login session? Requirements: · Perl


Unix::Login Related Software