Cant login after using Password Encryption !!!

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

Cant login after using Password Encryption !!!

Postby boiken » Fri Nov 21, 2014 3:45 pm

I Encrypted Password as the document ENCRYPTED_PASSWORDS.txt at vicidial.org/docs shows

After doing so now i cant login as admin (6666)

The initial password of this user was 12345678

Now i cant access this.

I did also this
1.Login at mysql database. typed the following
mysql -ucron -p1234 asterisk

2. once i entered the mysql cli I typed the following ie after the mysql>

select * from vicidial_users where user='6666';

I noted that the password is the same 12345678 and there is a pass_hash too at the end ??

Where might the problem be ?
CONTACT US
Vicidial Support
https://www.fiverr.com/share/rxDY0x
boiken
 
Posts: 134
Joined: Fri Sep 12, 2014 11:56 am
Location: World

Re: Cant login after using Password Encryption !!!

Postby marzo » Wed Apr 22, 2015 10:09 am

Hello,

I have the same problem.

Any help will be appreciate

ViciBox Redux v.6.0.3-141118
marzo
 
Posts: 66
Joined: Fri Apr 16, 2010 12:50 pm

Re: Cant login after using Password Encryption !!!

Postby marzo » Wed Apr 22, 2015 12:36 pm

I enabled Password Encryption following the steps given in: http://vicidial.org/docs/ENCRYPTED_PASSWORDS.txt

First I installed the CPAN module required for Password Encryption:
cpan
install Crypt::Eksblowfish::Bcrypt
quit
I did not receive any error message.

Then I run the following CLI script:
/usr/share/astguiclient/ADMIN_bcrypt_convert.pl --debugX --test
I did not receive any error message.

Then I run the following CLI script:
/usr/share/astguiclient/ADMIN_bcrypt_convert.pl --debugX
I did not receive any error message.

At this time I was unable to login using my user 6666 and the password I used before to enabled Password Encryption .

Then, I generated a pass hash manually with the command
/srv/www/htdocs/agc/bp.pl --pass=etc2015
PHASH: groMD/.iZpCxEjgmHgTTb5izLMjV78K

After that, I updated the database with the new value manually:
MariaDB [asterisk]> UPDATE vicidial_users set pass_hash='groMD/.iZpCxEjgmHgTTb5izLMjV78K' where user='6666';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

Checked the database:
MariaDB [asterisk]> select user,pass,pass_hash from vicidial_users;
+------+-----------+---------------------------------+
| user | pass | pass_hash |
+------+-----------+---------------------------------+
| 6666 | etc2015 | groMD/.iZpCxEjgmHgTTb5izLMjV78K |
| VDAD | donotedit | YnUyY3HWFzm2aMcGW63igOQX.0U.Fh6 |
| VDCL | donotedit | YnUyY3HWFzm2aMcGW63igOQX.0U.Fh6 |
+------+-----------+---------------------------------+
3 rows in set (0.00 sec)

However when I go to the WEB interface and try to login using the user 6666 and password etc2015 I am unable to login.
Login incorrect, please try again: |6666|etc2015|BAD|

Any help will be aprecciate
marzo
 
Posts: 66
Joined: Fri Apr 16, 2010 12:50 pm

Re: Cant login after using Password Encryption !!!

Postby mflorell » Wed Apr 22, 2015 12:48 pm

admin.php version and build?

Any errors in your apache error_log file?
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Cant login after using Password Encryption !!!

Postby marzo » Wed Apr 22, 2015 1:44 pm

Matt,
Thanks for your repply.

This is the admin.php version and his build:
admin_version = '2.12-481a';
build = '150421-2315';

This is the apache2 error_log file:
[Wed Apr 22 11:20:16.493511 2015] [ssl:warn] [pid 1296] AH01909: RSA certificate configured for dummy-host.example.com:443 does NOT include an ID which matches the server name
[Wed Apr 22 11:20:16.611815 2015] [ssl:warn] [pid 1296] AH01909: RSA certificate configured for dummy-host.example.com:443 does NOT include an ID which matches the server name
[Wed Apr 22 11:20:17.018694 2015] [mpm_prefork:notice] [pid 1296] AH00163: Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1k PHP/5.4.20 configured -- resuming normal operations
[Wed Apr 22 11:20:17.018766 2015] [core:notice] [pid 1296] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SSL -D SYSTEMD -D FOREGROUND'
Can't locate Crypt/Eksblowfish/Bcrypt.pm: Permission denied at ../agc/bp.pl line 22.
BEGIN failed--compilation aborted at ../agc/bp.pl line 22.
marzo
 
Posts: 66
Joined: Fri Apr 16, 2010 12:50 pm

Re: Cant login after using Password Encryption !!!

Postby mflorell » Wed Apr 22, 2015 3:19 pm

Here's the problem, it's not allowing PHP/Apache to execute the script for some reason:


Can't locate Crypt/Eksblowfish/Bcrypt.pm: Permission denied at ../agc/bp.pl line 22.
BEGIN failed--compilation aborted at ../agc/bp.pl line 22.


I haven't run into that before, so I'm not sure exactly how you would fix it.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Cant login after using Password Encryption !!!

Postby marzo » Fri Apr 24, 2015 10:03 am

In the past I have installed Vicidial 2.9 in Centos 6.6-x86_64 and I have enabled Password Encryption following the steps given in: http://vicidial.org/docs/ENCRYPTED_PASSWORDS.txt without any problem.

Then I think it has to be with the form how OpenSuse works the installation of CPAN modules Crypt::Eksblowfish::Bcrypt.

I have to figure out.
marzo
 
Posts: 66
Joined: Fri Apr 16, 2010 12:50 pm

Re: Cant login after using Password Encryption !!!

Postby ablond » Tue May 03, 2016 5:54 am

I ran into this problem on Vicibox 7.0.2 (My Installation script has been modified a bit, but shouldn't affect any of the stuff below, but still take with a grain of salt)
If anyone else runs into this problem, I'll lay out how I solved it on my webserver here. I'm new to opensuse and cpan, so I went through lots of steps. I've listed them here in case they are useful for anyone else. For the actual solution, skip to the end.

Troubleshooting stage 1:
  1. I don't recall any errors when following instructions about running "install Crypt::Eksblowfish::Bcrypt" in cpan. In hindsight though, it may have already thought it was installed?
  2. ERROR in apache error_log file: "Can't locate Crypt/Eksblowfish/Bcrypt.pm: Permission denied at ../agc/bp.pl line 22.”
  3. Line 22 is just “use Crypt::Eksblowfish::Bcrypt qw(en_base64);”
  4. File in question: /usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi/Crypt/Eksblowfish/Bcrypt.pm
  5. For some reason the Eksblowfish directory doesn’t have execute permissions for anyone but root, so can’t see contents. Apache is run as user ‘wwwrun’, so dies.
  6. Fixing the permission problem does not resolve the issue. Then becomes an error about "Can't locate loadable object for module Crypt::Eksblowfish" in /Crypt/Eksblowfish/Subkeyed.pm
Troubleshooting stage 2:
  1. Noticed that in cpan, running "make Crypt::Eksblowfish::Bcrypt" doesn't work, since missing make
  2. From CLI run: zypper in make
  3. Now in cpan, trying to make Bcrypt complains about YAML
  4. In cpan run: install YAML...Missing compiler candidate for one of the c files
  5. From CLI run: zypper in gcc
  6. In cpan run: install YAML...works this time
  7. In cpan run: make Crypt::Eksblowfish::Bcrypt...works now
  8. In cpan run: install Crypt::Eksblowfish::Bcrypt...says already latest version
  9. In cpan run: force install Crypt::Eksblowfish::Bcrypt...works!
  10. Now able to log in
Solution:
  1. From CLI: zypper in make gcc
  2. From cpan: install YAML
  3. From cpan: force install Crypt::Eksblowfish::Bcrypt
ablond
 
Posts: 1
Joined: Tue May 03, 2016 5:20 am

Re: Cant login after using Password Encryption !!!

Postby Kumba » Tue May 03, 2016 9:47 pm

Well, I created the perl-Crypt-Eksblowfish package for OpenSuSE back in 2013 I had the file permissions set to 644 instead of 755. So changing all files in that directory from to 755 file permission would fix it.

However, there is now an official perl-Crypt-Eksblowfish package that was created in devel:lanugages:perl on OpenSuSE in January so I would suggest you use it now. I've deleted the package I made from the home:vicidial repository which makes the change rather easy.

In short, you need to do the following:

1) zypper ref
2) zypper dup

This should notify you that the perl-Crypt-Eksblowfish module is changing vendor, which is what you want.
Kumba
 
Posts: 939
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 67 guests