Page 1 of 1

vicidial_users corrupt, I can not login

PostPosted: Tue May 13, 2014 9:02 am
by saulortega
Hello.

Yesterday it was working fine, but today no user can login in Vicidial. It is a new test installation, I updated yesterday. $admin_version = '2.8-438a'; $build = '140509-2201';

MariaDB [asterisk]> select * from vicidial_users;
ERROR 130 (HY000): Incorrect file format 'vicidial_users'

MariaDB [asterisk]> repair table vicidial_users;
+-------------------------+--------+----------+----------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------------+--------+----------+----------------------------------------+
| asterisk.vicidial_users | repair | Error | Incorrect file format 'vicidial_users' |
| asterisk.vicidial_users | repair | error | Corrupt |
+-------------------------+--------+----------+----------------------------------------+

:(

It is possible to recreate the vicidial_users tables?

Re: vicidial_users corrupt, I can not login

PostPosted: Tue May 13, 2014 11:57 am
by saulortega
I think this is a bug of a new release. Yerterday I updated this and another server (for test), and both have this problem....

Re: vicidial_users corrupt, I can not login

PostPosted: Tue May 13, 2014 7:52 pm
by mflorell
I haven't seen that, and I just updated a client last night. A DB schema change or change in Vicidial's programming should not cause that kind of error in MySQL. In my experience that error usually happens when the machine is shut down without MySQL first being stopped.

Re: vicidial_users corrupt, I can not login

PostPosted: Wed May 14, 2014 8:59 am
by geoff3dmg
Can also be caused by hardware issues. Disk or memory errors in particular.

Re: vicidial_users corrupt, I can not login

PostPosted: Fri May 16, 2014 10:29 am
by saulortega
How can I to insert the username manually?

I did this:

drop table vicidial_users;
create table vicidial_users (username varchar(20));
\. /usr/src/astguiclient/trunk/extras/upgrade_2.8.sql
insert into vicidial_users (username, pass_hash) values('6666', '7110eda4d09e062aa5e4a390b0a572ac0d2c0220');


But, I dont know what value should put in pass_hash. I tried the string "1234" in SHA1 and MD5 whitout results.. :(

Re: vicidial_users corrupt, I can not login

PostPosted: Fri May 16, 2014 3:08 pm
by mflorell
So you already manually enabled password encryption by running the required script?

Re: vicidial_users corrupt, I can not login

PostPosted: Fri May 16, 2014 3:46 pm
by saulortega
No, but How I do it without encryption?

Ok, running /usr/share/astguiclient/ADMIN_bcrypt_convert.pl --debugX --test I have a error, the user, pass, and full_name do not exist. So...

drop table vicidial_users;
create table vicidial_users (username varchar(20));
\. /usr/src/astguiclient/trunk/extras/upgrade_2.8.sql
alter table vicidial_users add (user char(20), pass char(20), full_name char(40));
insert into vicidial_users (user, pass, full_name) values('6666', '1234', 'Administrador');

It is fine?

MariaDB [asterisk]> describe vicidial_users;
+-------------------------------+----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------------+----------------------+------+-----+---------------------+-------+
| username | varchar(20) | YES | | NULL | |
| failed_login_count | tinyint(3) unsigned | YES | | 0 | |
| last_login_date | datetime | YES | | 2001-01-01 00:00:01 | |
| last_ip | varchar(15) | YES | | | |
| pass_hash | varchar(100) | YES | | | |
| alter_admin_interface_options | enum('0','1') | YES | | 1 | |
| max_inbound_calls | smallint(5) unsigned | YES | | 0 | |
| modify_custom_dialplans | enum('1','0') | YES | | 0 | |
| user | char(20) | YES | | NULL | |
| pass | char(20) | YES | | NULL | |
| full_name | char(40) | YES | | NULL | |
+-------------------------------+----------------------+------+-----+---------------------+-------+


MariaDB [asterisk]> select * from vicidial_users;
+----------+--------------------+---------------------+-------------+-----------+-------------------------------+-------------------+-------------------------+------+------+---------------+
| username | failed_login_count | last_login_date | last_ip | pass_hash | alter_admin_interface_options | max_inbound_calls | modify_custom_dialplans | user | pass | full_name |
+----------+--------------------+---------------------+-------------+-----------+-------------------------------+-------------------+-------------------------+------+------+---------------+
| NULL | 1 | 2001-01-01 00:00:01 | 192.168.7.7 | | 1 | 0 | 0 | 6666 | 1234 | Administrador |
+----------+--------------------+---------------------+-------------+-----------+-------------------------------+-------------------+-------------------------+------+------+---------------+


Still not working... :(

Re: vicidial_users corrupt, I can not login

PostPosted: Fri May 16, 2014 4:22 pm
by saulortega
Ok, there are very fields missing...

\. /usr/src/astguiclient/trunk/extras/upgrade_2.0.5.sql
\. /usr/src/astguiclient/trunk/extras/upgrade_2.2.0.sql
\. /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql
\. /usr/src/astguiclient/trunk/extras/upgrade_2.6.sql
\. /usr/src/astguiclient/trunk/extras/upgrade_2.8.sql


MariaDB [asterisk]> describe vicidial_users;
+------------------------------------+--------------------------------------------------------------------------------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------------------------+--------------------------------------------------------------------------------------------+------+-----+---------------------+-------+
| username | varchar(20) | YES | | NULL | |
| failed_login_count | tinyint(3) unsigned | YES | | 0 | |
| last_login_date | datetime | YES | | 2001-01-01 00:00:01 | |
| last_ip | varchar(15) | YES | | | |
| pass_hash | varchar(100) | YES | | | |
| alter_admin_interface_options | enum('0','1') | YES | | 1 | |
| max_inbound_calls | smallint(5) unsigned | YES | | 0 | |
| modify_custom_dialplans | enum('1','0') | YES | | 0 | |
| user | varchar(20) | NO | PRI | NULL | |
| pass | varchar(20) | NO | | NULL | |
| full_name | varchar(40) | YES | | NULL | |
| user_level | tinyint(3) unsigned | YES | | 1 | |
| qc_enabled | enum('1','0') | YES | | 0 | |
| qc_user_level | int(2) | YES | | 1 | |
| qc_pass | enum('1','0') | YES | | 0 | |
| qc_finish | enum('1','0') | YES | | 0 | |
| qc_commit | enum('1','0') | YES | | 0 | |
| add_timeclock_log | enum('1','0') | YES | | 0 | |
| modify_timeclock_log | enum('1','0') | YES | | 0 | |
| delete_timeclock_log | enum('1','0') | YES | | 0 | |
| alter_custphone_override | enum('NOT_ACTIVE','ALLOW_ALTER') | YES | | NOT_ACTIVE | |
| vdc_agent_api_access | enum('0','1') | YES | | 0 | |
| modify_inbound_dids | enum('1','0') | YES | | 0 | |
| delete_inbound_dids | enum('1','0') | YES | | 0 | |
| active | enum('Y','N') | YES | | Y | |
| alert_enabled | enum('1','0') | YES | | 0 | |
| download_lists | enum('1','0') | YES | | 0 | |
| agent_shift_enforcement_override | enum('DISABLED','OFF','START','ALL') | YES | | DISABLED | |
| manager_shift_enforcement_override | enum('0','1') | YES | | 0 | |
| shift_override_flag | enum('0','1') | YES | | 0 | |
| export_reports | enum('1','0') | YES | | 0 | |
| delete_from_dnc | enum('0','1') | YES | | 0 | |
| email | varchar(100) | YES | | | |
| user_code | varchar(100) | YES | | | |
| territory | varchar(100) | YES | | | |
| allow_alerts | enum('0','1') | YES | | 0 | |
| agent_choose_territories | enum('0','1') | YES | | 1 | |
| custom_one | varchar(100) | YES | | | |
| custom_two | varchar(100) | YES | | | |
| custom_three | varchar(100) | YES | | | |
| custom_four | varchar(100) | YES | | | |
| custom_five | varchar(100) | YES | | | |
| voicemail_id | varchar(10) | YES | | | |
| agent_call_log_view_override | enum('DISABLED','Y','N') | YES | | DISABLED | |
| callcard_admin | enum('1','0') | YES | | 0 | |
| agent_choose_blended | enum('0','1') | YES | | 1 | |
| realtime_block_user_info | enum('0','1') | YES | | 0 | |
| custom_fields_modify | enum('0','1') | YES | | 0 | |
| force_change_password | enum('Y','N') | YES | | N | |
| agent_lead_search_override | enum('NOT_ACTIVE','ENABLED','LIVE_CALL_INBOUND','LIVE_CALL_INBOUND_AND_MANUAL','DISABLED') | YES | | NOT_ACTIVE | |
| modify_shifts | enum('1','0') | YES | | 0 | |
| modify_phones | enum('1','0') | YES | | 0 | |
| modify_carriers | enum('1','0') | YES | | 0 | |
| modify_labels | enum('1','0') | YES | | 0 | |
| modify_statuses | enum('1','0') | YES | | 0 | |
| modify_voicemail | enum('1','0') | YES | | 0 | |
| modify_audiostore | enum('1','0') | YES | | 0 | |
| modify_moh | enum('1','0') | YES | | 0 | |
| modify_tts | enum('1','0') | YES | | 0 | |
| preset_contact_search | enum('NOT_ACTIVE','ENABLED','DISABLED') | YES | | NOT_ACTIVE | |
| modify_contacts | enum('1','0') | YES | | 0 | |
| modify_same_user_level | enum('0','1') | YES | | 1 | |
| admin_hide_lead_data | enum('0','1') | YES | | 0 | |
| admin_hide_phone_data | enum('0','1','2_DIGITS','3_DIGITS','4_DIGITS') | YES | | 0 | |
| agentcall_email | enum('0','1') | YES | | 0 | |
| modify_email_accounts | enum('0','1') | YES | | 0 | |
+------------------------------------+--------------------------------------------------------------------------------------------+------+-----+---------------------+-------+

Re: vicidial_users corrupt, I can not login

PostPosted: Fri May 16, 2014 4:51 pm
by mflorell
Encryption is only enabled if you run that script, there is no need to worry about a pass hash if you have not run the script and enabled encryption.

I really think that if this is a new system something went very wrong during installation. You should probably just start over and do a new install.

Re: vicidial_users corrupt, I can not login

PostPosted: Fri May 16, 2014 5:43 pm
by saulortega
But I have two systems. One new (Vicibox 5.0.3 installed and updated some days ago), another old (Vicibox 4.0.3, updated some days ago). Both have this problem, it happened after update. Both are virtualized.

Any way, I'll reinstall, and update it again... Let's see what happens. :roll: