1Authen::Simple::Passwd(U3s)er Contributed Perl DocumentatAiuotnhen::Simple::Passwd(3)
2
3
4

NAME

6       Authen::Simple::Passwd - Simple Passwd authentication
7

SYNOPSIS

9           use Authen::Simple::Passwd;
10
11           my $passwd = Authen::Simple::Passwd->new(
12               path => '/etc/passwd'
13           );
14
15           if ( $passwd->authenticate( $username, $password ) ) {
16               # successfull authentication
17           }
18
19           # or as a mod_perl Authen handler
20
21           PerlModule Authen::Simple::Apache
22           PerlModule Authen::Simple::Passwd
23
24           PerlSetVar AuthenSimplePasswd_path "/etc/passwd"
25
26           <Location /protected>
27             PerlAuthenHandler Authen::Simple::Passwd
28             AuthType          Basic
29             AuthName          "Protected Area"
30             Require           valid-user
31           </Location>
32

DESCRIPTION

34       Authenticate against a passwd file.
35

METHODS

37       ·   new
38
39           This method takes a hash of parameters. The following options are
40           valid:
41
42           ·       path
43
44                   Path to passwd file to authenticate against. Any standard
45                   passwd file that has records seperated with newline and
46                   fields seperated by ":" is supported.  First field is
47                   expected to be username and second field, plain or
48                   encrypted password. Required.
49
50                       path => '/etc/passwd'
51                       path => '/var/www/.htpasswd'
52
53           ·       flock
54
55                   A boolean to enable or disable the usage of "flock()".
56                   Defaults to "d_flock" in Config.
57
58                       flock => 0
59
60           ·       log
61
62                   Any object that supports "debug", "info", "error" and
63                   "warn".
64
65                       log => Log::Log4perl->get_logger('Authen::Simple::Passwd')
66
67       ·   authenticate( $username, $password )
68
69           Returns true on success and false on failure. Authentication
70           attempts with a username that begins with a hyphen "-" will always
71           return false.
72

SEE ALSO

74       Authen::Simple.
75
76       Authen::Simple::Password.
77
78       passwd(5).
79

AUTHOR

81       Christian Hansen "ch@ngmedia.com"
82
84       This program is free software, you can redistribute it and/or modify it
85       under the same terms as Perl itself.
86
87
88
89perl v5.32.0                      2020-07-28         Authen::Simple::Passwd(3)
Impressum