Added --conffile option to ADMIN_bcrypt_convert.pl script
Added new Spanish(es) ALL translation file, v004 Updated encrypted passwords doc git-svn-id: svn://192.168.202.10@2234 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
#
|
||||||
# ADMIN_bcrypt_convert.pl version 2.8
|
# ADMIN_bcrypt_convert.pl version 2.10
|
||||||
#
|
#
|
||||||
# Bcrypt password hashing conversion script to be used for authentication
|
# Bcrypt password hashing conversion script to be used for authentication
|
||||||
#
|
#
|
||||||
@@ -10,12 +10,13 @@
|
|||||||
# IMPORTANT !!!!!!!!!!!!!
|
# IMPORTANT !!!!!!!!!!!!!
|
||||||
# The Crypt::Eksblowfish::Bcrypt perl module is REQUIRED for this script
|
# The Crypt::Eksblowfish::Bcrypt perl module is REQUIRED for this script
|
||||||
#
|
#
|
||||||
# Copyright (C) 2013 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2014 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# CHANGES
|
# CHANGES
|
||||||
#
|
#
|
||||||
# 130704-2041 - First build
|
# 130704-2041 - First build
|
||||||
|
# 141231-0959 - Added --conffile option
|
||||||
#
|
#
|
||||||
|
|
||||||
$T=0;
|
$T=0;
|
||||||
@@ -43,6 +44,7 @@ if (length($ARGV[0])>1)
|
|||||||
print "IMPORTANT!!! RUN FIRST WITH THE --test FLAG TO MAKE SURE IT WORKS!!!\n";
|
print "IMPORTANT!!! RUN FIRST WITH THE --test FLAG TO MAKE SURE IT WORKS!!!\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
print "allowed run time options:\n";
|
print "allowed run time options:\n";
|
||||||
|
print " [--conffile=/path/from/root] = define configuration file path from root at runtime\n";
|
||||||
print " [--salt=XXX] = overide the system salt\n";
|
print " [--salt=XXX] = overide the system salt\n";
|
||||||
print " [--cost=XX] = overide the system cost\n";
|
print " [--cost=XX] = overide the system cost\n";
|
||||||
print " [--test] = testing mode only, no database updates\n";
|
print " [--test] = testing mode only, no database updates\n";
|
||||||
@@ -118,6 +120,18 @@ if (length($ARGV[0])>1)
|
|||||||
if ($DB > 0)
|
if ($DB > 0)
|
||||||
{print "\n----- COST OVERRIDE: $CLIcost -----\n\n";}
|
{print "\n----- COST OVERRIDE: $CLIcost -----\n\n";}
|
||||||
}
|
}
|
||||||
|
if ($args =~ /--conffile=/i) # CLI defined conffile path
|
||||||
|
{
|
||||||
|
@CLIconffileARY = split(/--conffile=/,$args);
|
||||||
|
@CLIconffileARX = split(/ /,$CLIconffileARY[1]);
|
||||||
|
if (length($CLIconffileARX[0])>2)
|
||||||
|
{
|
||||||
|
$PATHconf = $CLIconffileARX[0];
|
||||||
|
$PATHconf =~ s/\/$| |\r|\n|\t//gi;
|
||||||
|
$CLIconffile=1;
|
||||||
|
if (!$Q) {print " CLI defined conffile path: $PATHconf\n";}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -134,7 +148,8 @@ if ( ($T < 1) && (!-e "/etc/vicidial_bcrypt.test") )
|
|||||||
}
|
}
|
||||||
|
|
||||||
# default path to astguiclient configuration file:
|
# default path to astguiclient configuration file:
|
||||||
$PATHconf = '/etc/astguiclient.conf';
|
if (length($PATHconf) < 5)
|
||||||
|
{$PATHconf = '/etc/astguiclient.conf';}
|
||||||
|
|
||||||
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
||||||
@conf = <conf>;
|
@conf = <conf>;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
ENCRYPTED PASSWORDS DOC Started: 2013-07-09 Updated: 2013-07-09
|
ENCRYPTED PASSWORDS DOC Started: 2013-07-09 Updated: 2014-12-31
|
||||||
|
|
||||||
|
|
||||||
NOTE: THIS FEATURE IS OPTIONAL, AND SHOULD ONLY BE ACTIVATED AFTER YOUR SYSTEM
|
NOTE: THIS FEATURE IS OPTIONAL, AND SHOULD ONLY BE ACTIVATED AFTER YOUR SYSTEM
|
||||||
@@ -61,3 +61,14 @@ hash that checks against the vicidial_users table password hash if Password
|
|||||||
Encryption is enabled on your system.
|
Encryption is enabled on your system.
|
||||||
|
|
||||||
NOTES: Enabling Password Encryption will force case-sensitive passwords
|
NOTES: Enabling Password Encryption will force case-sensitive passwords
|
||||||
|
|
||||||
|
|
||||||
|
To test the password encryption, or to generate a pass hash manually, just go to
|
||||||
|
your web server and run this command on the bp.pl script:
|
||||||
|
|
||||||
|
/srv/www/htdocs/agc/bp.pl --pass=test
|
||||||
|
|
||||||
|
You can also use the above command to generate a new password hash if you have
|
||||||
|
forgotten your password and update the database with the new value manually:
|
||||||
|
|
||||||
|
UPDATE vicidial_users set pass_hash='kfYvywV959fn09rSZML70wHjjxsaYjm' where user='123';
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user