Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Authen::SimplePam 0.1.24

    Download button

    No screenshots available
    Downloads: 407  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Raul Dias | More programs
    Perl Artistic License / FREE
    November 20th, 2007, 19:12 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Authen::SimplePam description

    Authen::SimplePam is a simple Perl interface to PAM authentication.

    Authen::SimplePam is a simple Perl interface to PAM authentication.

    SYNOPSIS

    use Authen::SimplePam;
    $auth = new Authen::PAM;
    $auth->auth_user( $user, $password, $service );
    $auth->change_password ( $user, $old_password, $new_password );

    This module simplifies the use of PAM to Authenticate users. It makes things simple so that no PAM knowledge is necessary.

    API

    The API is simple:

    new

    Creates a Authen::SimplePam object.

    username ( $username )

    If the parameter $username is set, it sets the username. It will return the current username.

    user ( $username )
    Same as username().
    name ( $username )
    Same as username().
    current_password ( $password )

    The user current password. If $password is given, the password is set. It will return the current set password.

    password ( $password )
    Same as current_password().
    old_password( $password )
    Same as current_password().
    new_password ( $password )

    If $password is present, it will set the user new password. It returns the current set new password.

    service ( $service )

    If $service is given, it will set the PAM service to use. It will return the current service set.

    pam_result ()

    Returns the last PAM result code.

    error_code ()

    Returns undef if no error has happened, otherwise returns the error code.

    error_message ()

    Returns undef if no error has happened, otherwise returns the error message.

    Note that the error message is the pam message give to a PAM_ERROR_MSG call.

    Other error might have happened, but did not set PAM_ERROR_MSG, but is in the result code from the functions auth_user () and change_password ().

    auth_user ($user, $password, $service)

    Authenticates a user $user, with the passwod $password agains service $service.

    Note that $user, $password and $service are optional. If given they will overwrite any previously given one.

    If no $serice has being yet specified, it will defaults to the service 'login'.
    If no $username has being yet specified, it will defaults to the current EFECTIVE USER ID (EUID).

    It will return Authen::SimplePam own result code. If you would like to know the real PAM result code, use pam_result() to get it.

    To get and string representation of the result, use result2string () .

    result2string ($result)

    Converts a result returned by auth_user() or change_password () to a string.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    PAM authentication | Perl interface | Perl module | Perl | interface | PAM

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM