[ale] scripting passwd change
Fletch
fletch at phydeaux.org
Tue Aug 22 15:52:24 EDT 2000
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.
More information about the Ale
mailing list