Authen::Simple::PAM doesn't DWIM

Peter Edwards peter at dragonstaff.com
Mon Feb 18 13:00:34 GMT 2008


Simon Wistow wrote:
>Which, if I run it from the command line succeeds all the time as long as
$user is the same user I'm logged in as, no matter what the password given
is.
>
>However, if I give another username then no matter whether the password is
correct or not, it always fails.
>
>Am I missing something really obvious? Is PAM not supposed to work this
way? Is it something screwy with my FreeBSD jail set up? 

When using the PAM login method then depending on your configuration in
/etc/pam.d/login you may need to run as root to check user auths other than
your own. 
You could try a setuid script (slapped wrist, don't forget -T taint flag) or
if you know it's a Unix login and don't mind a slow response time there's
Authen::Simple::SSH
http://search.cpan.org/search?query=Authen%3A%3ASimple%3A%3ASSH&mode=all


Regards, Peter
http://perl.dragonstaff.co.uk






More information about the london.pm mailing list