blob: 0b82bea735d59698696db2ea03075fdc7b9d884f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/perl
BEGIN
{
our $BUCKY = "/cgi-bin/bucky";
our $BUCKY_DB = "bucky";
our $BUCKY_DB_CNF = "/var/www/vhosts/carbonpictures.com/.bucky.cnf";
}
use lib "/var/www/vhosts/carbonpictures.com/bucky/lib";
use Bucky1;
our $dbh = DBI->connect ($dsn);
#our $DEBUG = 1;
my ($user, $pw) = @ARGV;
do_password_reset($user, $pw, $pw);
$dbh->disconnect();
sub do_password_reset
{
my ($user, $pw1, $pw2) = @_;
if (length($pw1) && length($pw2))
{
if ($pw1 eq $pw2)
{
update_password($user, crypt($pw1,lc($user)));
print qq(password changed for $user<br>\n);
}
else
{
print "passwords don't match!<br>\n";
}
}
}
|