Lo all,
I suspect this is Crypt::RandPassword's doing, but if anyone can please help, I'd appreciate it (as always)
<code> #!/usr/bin/perl use Crypt::RandPasswd; use Mysql; use Net::SMTP; use Number::Format; use POSIX; use strict; use Sys::Syslog; use warnings;
# Stage 1: Rotate Test Passwords.
$Date_Start = POSIX::strftime("%Y-%m-%d", 0, 0, 0, ($MDay - 1), $Mon, $Year, $WDay, $YDay, $Isdst);
my $Pass064 = Crypt::RandPasswd::word('8','10');
my $Pass128 = Crypt::RandPasswd::word('8','10');
my $Pass192 = Crypt::RandPasswd::word('8','10');
my $Pass256 = Crypt::RandPasswd::word('8','10');
print "UPDATE RadiusCheck SET Value='" . $Pass064 . "' WHERE UserName='TEST064' AND CustID='0'\n";
print "UPDATE RadiusCheck SET Value='" . $Pass128 . "' WHERE UserName='TEST128' AND CustID='0'\n";
print "UPDATE RadiusCheck SET Value='" . $Pass192 . "' WHERE UserName='TEST192' AND CustID='0'\n";
print "UPDATE RadiusCheck SET Value='" . $Pass256 . "' WHERE UserName='TEST256' AND CustID='0'\n";
die;
</code>
The script never gets to the PRINT statements. I run it, it works. I run it again, it just sits there with a blank. Sometimes, one or more of the print statements will execute, sometimes all of them, sometimes none of them. This code is as simple as can be... Am I doing anything wrong??
You might put the calls to crypt password into a select loop as many progress meters are written. I suspect that it is still working, did you see the caveats, specifically the "Bugs" in the docs:
"Bugs
The function to generate a password can sometimes take an extremely long time."
It could just be trying to derive enough entropy, or similar, especially since you make multiple calls from within the same script. At least try putting a print call between each of the calls to Crypt::RandPasswd::word. How long have you let it run and is it on a local workstation or on a server that would have no X head?
http://danconia.org
-- Chris.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>