[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] scripting passwd change
- Subject: [ale] scripting passwd change
- From: fletch at phydeaux.org (Fletch)
- Date: 22 Aug 2000 15:52:24 -0400
http://search.cpan.org/search?dist=Authen-PAM
Examples
Here is an example of using PAM for changing the password of the
current user:
use Authen::PAM;
$login_name = getpwuid($<);
pam_start("passwd", $login_name, $pamh);
pam_chauthtok($pamh);
pam_end($pamh);
or the same thing but using OO style:
$pamh = new Authen::PAM("passwd", $login_name);
$pamh->pam_chauthtok;
$pamh = 0; # Force perl to call the destructor for the $pamh
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
678 443-6239(w) | scary questions." -- Jules =(___)=
| U
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.