Deleted Tenant VitalPBX

VitalPBX Community Support General Discussion Deleted Tenant VitalPBX

  • Post
    minda
    Participant

    While playing and learning VitalPBX found there an existing tenant. Deleted it and locked myself out. Can’t log in now. Is there any way to reinstate admin login? 

    [root@vitalpbx scripts]# ./reset_pwd
    The password cannot be reset, due the user admin doesn’t exists

    0
Viewing 10 replies - 1 through 10 (of 10 total)
  • Replies
    Up
    0
    Down

    Did you delete the tenant or the user?

    0
    minda
    Participant
    Up
    0
    Down

    I deleted tenant only. But apparently user is gone as well.

    MariaDB [ombutel]> select * from ombu_users
    -> ;
    Empty set (0.00 sec)

     

    As I understand tenant VitalPBX is the main administrator tenant. That way it should be not deletable. admin was the only user I had. for the whole PBX

    0
    Up
    0
    Down

    May you drop the databases (ombutel, asterisk) and reinstall these databases again? 

    0
    minda
    Participant
    Up
    0
    Down

    Can you provide me command line instructions on how to do it please?

    0
    Up
    0
    Down

    Do the following in the Linux console: 

    mysql -uroot -e "drop database asterisk"
    mysql -uroot -e "drop database ombutel"
    vitalpbx --build-db
    vitalpbx --dump-conf

    On the other hand, we already find the issue and will be fixed for the next version of VitalPBX

    0
    minda
    Participant
    Up
    0
    Down

    When is the new version coming out?

    I did drop and reacreace db following your commands. When went back to log in got errors… 

    Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column ’email’ in ‘where clause’ With Query: select `91726ae201cc9d22b9e2c76c94ed6c0a`.`user_id` as `user_id`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`parent_id` as `parent_id`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`role_id` as `role_id`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`tenant_id` as `tenant_id`,hex(`91726ae201cc9d22b9e2c76c94ed6c0a`.`uid`) as `uid`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`displayname` as `displayname`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`department` as `department`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`username` as `username`,hex(`91726ae201cc9d22b9e2c76c94ed6c0a`.`password`) as `password`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`locale` as `locale`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`timezone` as `timezone`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`startapp` as `startapp`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`theme` as `theme`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`portalexten` as `portalexten`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`portaluser` as `portaluser`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`multitab` as `multitab`,`91726ae201cc9d22b9e2c76c94ed6c0a`.`enabled` as `enabled` from `ombutel`.`ombu_users` as `91726ae201cc9d22b9e2c76c94ed6c0a` where `username` = ? or `email` = ? at file /usr/share/ombutel/www/includes/db.php on line 0

    0
    Up
    0
    Down

    I suppose that the build-db command didn’t finish or an error happening during the process

    0
    minda
    Participant
    Up
    0
    Down

    [root@vitalpbx scripts]# vitalpbx –build-db
    Table `ombutel`.`ombu_patches` does not exist, assuming new installation.
    Importing 20160208.1.init.sql…
    Importing 20160208.2.cdr.sql…
    Importing 20160208.3.tables.sql…
    Importing 20160208.4.data.sql…
    Importing 20160208.5.epm.tables.sql…
    Importing 20160208.6.epm.data.sql…
    Importing 20160209.1.queues.members_settings.sql…
    Importing 20160210.1.destinations.table.sql…
    Importing 20160210.2.destinations.data.sql…
    Importing 20160210.ntp.sql…
    Importing 20160210.resetinterval.sql…
    Importing 20160215.1.features.schema.sql…
    Importing 20160215.2.features.data.sql…
    Importing 20160216.1.epm_gs_16xx_yealink_support.sql…
    Importing 20160216.1.night_mode.schema.sql…
    Importing 20160216.2.sys_directories.table.sql…
    Importing 20160216.3.sys_directories.data.sql…
    Importing 20160216.4.sys_general.sql…
    Importing 20160217.1.features.reminder.sql…
    Importing 20160217.1.ombutel_module.sql…
    Importing 20160217.2.ami_settings.sql…
    Importing 20160218.1.epm_xorcom_xp0101_1515.sql…
    Importing 20160219.1.remove_wakup_module.sql…
    Importing 20160221.dbconfig.sql…
    Importing 20160222.1.devices_schema.sql…
    Importing 20160222.2.extensions_schema.sql…
    Importing 20160223.1.extensions_vm_schema.sql…
    Importing 20160223.2.followme_schema.sql…
    Importing 20160224.1.system_general.sql…
    Importing 20160224.2.system_general.sql…
    Importing 20160225.1.extension_diversions.sql…
    Importing 20160225.device_naming.sql…
    Importing 20160225.trunk_group_items.sql…
    Importing 20160301.extension_naming.sql…
    Importing 20160301.fix_followme.sql…
    Importing 20160302.remove_voicemail_conf.sql…
    Importing 20160303.1.account_codes_schema.sql…
    Importing 20160303.1.fax_destination.sql…
    Importing 20160303.2.auth_codes_schema.sql…
    Importing 20160303.moh_group.sql…
    Importing 20160306.sec_bos_foreign_key.sql…
    Importing 20160306.voicemail_update.sql…
    Importing 20160307.io_ports.sql…
    Importing 20160308.1.cdr_filters_schema.sql…
    Importing 20160310.cdr_trunk_variables.sql…
    Importing 20160310.trunk_id.sql…
    Importing 20160314.1.reload.sql…
    Importing 20160314.2.reload.sql…
    Importing 20160315.reload_dahdi.sql…
    Importing 20160316.1.remove_set_pa_numbers.sql…
    Importing 20160317.1.iax_settings.sql…
    Importing 20160317.1.logfiles_general.sql…
    Importing 20160317.voicemail_general.sql…
    Importing 20160320.0.sip_settings.sql…
    Importing 20160320.0.system_directories.sql…
    Importing 20160320.0.system_misc.sql…
    Importing 20160320.0.tenant_trunks.sql…
    Importing 20160320.0.trunk_group_mode.sql…
    Importing 20160320.1.epm_remote_phonebook_additions.sql…
    Importing 20160321.1.epm_yealink_vpt49g_account_settings.sql…
    Importing 20160321.2.epm_rename_xorcom_device.sql…
    Importing 20160323.astmanager_users.sql…
    Importing 20160324.1.fax_to_send.sql…
    Importing 20160329.renamed_ring_group_id.sql…
    Importing 20160330.1.accountcodes.sql…
    Importing 20160330.1.ami_users.sql…
    Importing 20160330.1.announcements.sql…
    Importing 20160330.1.authentication_codes.sql…
    Importing 20160330.1.callbacks.sql…
    Importing 20160330.1.cdr_filter_conditions.sql…
    Importing 20160330.1.classes_of_service.sql…
    Importing 20160330.1.custom_applications.sql…
    Importing 20160330.1.custom_destinations.sql…
    Importing 20160330.1.dialrule_patterns.sql…
    Importing 20160330.1.feature_code_categories.sql…
    Importing 20160330.1.feature_code_category_members.sql…
    Importing 20160330.1.feature_code_groups.sql…
    Importing 20160330.1.feature_codes.sql…
    Importing 20160330.1.inbound_routes.sql…
    Importing 20160330.1.ivrs.sql…
    Importing 20160330.1.menu.sql…
    Importing 20160330.1.nightmodes.sql…
    Importing 20160330.1.outbound_route_ivirtuals.sql…
    Importing 20160330.1.outbound_route_members.sql…
    Importing 20160330.1.outbound_route_patterns.sql…
    Importing 20160330.1.outbound_routes.sql…
    Importing 20160330.1.page_members.sql…
    Importing 20160330.1.pages.sql…
    Importing 20160330.1.parking_lots.sql…
    Importing 20160330.1.pickup_group_members.sql…
    Importing 20160330.1.pickup_groups.sql…
    Importing 20160330.1.pin_lists.sql…
    Importing 20160330.1.queue_members.sql…
    Importing 20160330.1.queue_priorities.sql…
    Importing 20160330.1.queue_vip_lists.sql…
    Importing 20160330.1.ring_group_members.sql…
    Importing 20160330.1.role_privileges.sql…
    Importing 20160330.1.speed_dials.sql…
    Importing 20160330.1.static_leases.sql…
    Importing 20160330.1.trunk_parameters.sql…
    Importing 20160330.1.voicemail_broadcast_members.sql…
    Importing 20160330.1.voicemail_broadcasts.sql…
    Importing 20160330.1.xml_directories.sql…
    Importing 20160330.2.accountcode_id.sql…
    Importing 20160330.2.ami_user_id.sql…
    Importing 20160330.2.announcement_id.sql…
    Importing 20160330.2.ars_id.sql…
    Importing 20160330.2.authentication_code_id.sql…
    Importing 20160330.2.callback_id.sql…
    Importing 20160330.2.cdr_filter_id.sql…
    Importing 20160330.2.class_of_service_id.sql…
    Importing 20160330.2.codec_id.sql…
    Importing 20160330.2.conference_id.sql…
    Importing 20160330.2.custom_application_id.sql…
    Importing 20160330.2.custom_destination_id.sql…
    Importing 20160330.2.destination.sql…
    Importing 20160330.2.dialrule_id.sql…
    Importing 20160330.2.disa_id.sql…
    Importing 20160330.2.feature_code_category_id.sql…
    Importing 20160330.2.feature_code_group_id.sql…
    Importing 20160330.2.feature_code_id.sql…
    Importing 20160330.2.firewall_rule_id.sql…
    Importing 20160330.2.firewall_service_id.sql…
    Importing 20160330.2.firewall_whitelist_id.sql…
    Importing 20160330.2.inbound_route_id.sql…
    Importing 20160330.2.intrusion_whitelist_id.sql…
    Importing 20160330.2.ivr_id.sql…
    Importing 20160330.2.language_id.sql…
    Importing 20160330.2.logfile_id.sql…
    Importing 20160330.2.menu_id.sql…
    Importing 20160330.2.music_file_id.sql…
    Importing 20160330.2.music_group_id.sql…
    Importing 20160330.2.nightmode_id.sql…
    Importing 20160330.2.outbound_route_id.sql…
    Importing 20160330.2.page_id.sql…
    Importing 20160330.2.parking_lot_id.sql…
    Importing 20160330.2.pickup_group_id.sql…
    Importing 20160330.2.pin_list_id.sql…
    Importing 20160330.2.queue_id.sql…
    Importing 20160330.2.queue_priority_id.sql…
    Importing 20160330.2.queue_vip_list_id.sql…
    Importing 20160330.2.recording_id.sql…
    Importing 20160330.2.role_id.sql…
    Importing 20160330.2.speed_dial_id.sql…
    Importing 20160330.2.static_lease_id.sql…
    Importing 20160330.2.tenant_id.sql…
    Importing 20160330.2.time_condition_id.sql…
    Importing 20160330.2.time_group_id.sql…
    Importing 20160330.2.user_id.sql…
    Importing 20160330.2.voicemail_broadcast_id.sql…
    Importing 20160330.2.voicemail_timezone_id.sql…
    Importing 20160330.2.xml_directory_id.sql…
    Importing 20160403.fix_class_of_service_id.sql…
    Importing 20160404.1.default_log_dateformat.sql…
    Importing 20160404.2.collate_utf8.sql…
    Importing 20160405.1.blacklist.sql…
    Importing 20160406.1.boss_white_list.sql…
    Importing 20160406.1.move_voicemail_texts_to_db.sql…
    Importing 20160406.2.remove_voicemail_texts_from_db.sql…
    Importing 20160406.menu.sql…
    Importing 20160406.user.sql…
    Importing 20160411.1.play_all_prompts_feature.sql…
    Importing 20160414.1.route_selection.sql…
    Importing 20160420.1.voicemail_body_text_change.sql…
    Importing 20160427.1.add_co
    decs_to_trunks.sql…
    Importing 20160427.1.voicemail_texts_change.sql…
    Importing 20160428.1.remove_maintenance_mod.sql…
    Importing 20160429.disa_cid.sql…
    Importing 20160501.1.dahdi_r2_profile_update.sql…
    Importing 20160501.maintenance.sql…
    Importing 20160502.1.remove_tenants_module.sql…
    Importing 20160502.dahdi_spans.sql…
    Importing 20160503.1.add_call_completion_code.sql…
    Importing 20160503.1.fwm_ring_strategy.sql…
    Importing 20160503.2.remove_extensions_cc_param.sql…
    Importing 20160504.1.rm_ring_group_cos.sql…
    Importing 20160504.2.rm_xml_dir_mod.sql…
    Importing 20160505.1.add_fm_call_screening.sql…
    Importing 20160513.1.cdr_user_fields.sql…
    Importing 20160514.rename_patchfiles.sql…
    Importing 20160515.1.voicemail_attach.sql…
    Importing 20160515.remove_callcounter.sql…
    Importing 20160516.1.rename_iax_settings.sql…
    Importing 20160517.e1r2.sql…
    Importing 20160517.t1cas.sql…
    Importing 20160518.1.renamed_cc_soundprompt.sql…
    Importing 20160518.e1r2_logging.sql…
    Importing 20160525.sip_defaults.sql…
    Importing 20160526.1.renamed_prof_iax_to_iax2.sql…
    Importing 20160526.recordings.sql…
    Importing 20160528.1.auth_alias.sql…
    Importing 20160601.cdr.sql…
    Importing 20160601.cdr_filters.sql…
    Importing 20160601.trunk_reg_flag.sql…
    Importing 20160606.1.queues_cid_name_prefix.sql…
    Importing 20160607.1.added_nat_option.sql…
    Importing 20160608.1.changed_dialing_options.sql…
    Importing 20160609.1.updated_epm_table.sql…
    Importing 20160609.sub-local-extension.sql…
    Importing 20160613.1.multiple_queues_login_logout.sql…
    Importing 20160613.1.r2_fields_out_of_range.sql…
    Importing 20160614.1.ivr_cos.sql…
    Importing 20160622.1.queues_login_logout_toggle.sql…
    Importing 20160622.2.queues_pause_unpause.sql…
    Importing 20160624.1.allow_disable_trunks.sql…
    Importing 20160627.1.nightmode_missed_fields.sql…
    Importing 20160627.queue_members.sql…
    Importing 20160628.1.fax_table.sql…
    Importing 20160629.1.rename_feature.sql…
    Importing 20160630.1.update_vm_brdcast_grp.sql…
    Importing 20160705.1.extension_language.sql…
    Importing 20160708.1.vm_instructions.sql…
    Importing 20160710.reminders.sql…
    Importing 20160711.1.epm_gs_buttons.sql…
    Importing 20160711.announcements.sql…
    Importing 20160711.ars.sql…
    Importing 20160711.callbacks.sql…
    Importing 20160711.classes_of_service.sql…
    Importing 20160711.custom_destinations.sql…
    Importing 20160712.1.epm_update_xp0101p.sql…
    Importing 20160712.2.epm_add_ip601.sql…
    Importing 20160713.1.epm_update_polycom.sql…
    Importing 20160713.2.epm_add_vtech.sql…
    Importing 20160714.1.epm_add_vtech_oui.sql…
    Importing 20160714.1.vm_force_greetings.sql…
    Importing 20160714.2.vm_enable_force_name.sql…
    Importing 20160717.1.epm_vtech_settings.sql…
    Importing 20160717.2.epm_add_xp0101_parants.sql…
    Importing 20160718.1.ext_missed_fields.sql…
    Importing 20160718.1.portal_modules_naming.sql…
    Importing 20160719.astcli.sql…
    Importing 20160721.1.dahdi.sql…
    Executing 20160721.2.dahdi.php…
    Importing 20160721.3.dahdi.sql…
    Importing 20160726.1.tenant_path.sql…
    Importing 20160726.1.tenants.sql…
    Executing 20160726.2.tenant_path.php…
    Importing 20160728.load_data_infile.sql…
    Importing 20160728.xepm_model_button_types.sql…
    Importing 20160810.firewall_reload.sql…
    Importing 20160811.1.menu_localization.sql…
    Importing 20160814.primaries.sql…
    Importing 20160815.endpoint.sql…
    Importing 20160815.foreign_keys.sql…
    Importing 20160815.module_localization.sql…
    Importing 20160815.tenants.sql…
    Importing 20160816.enable_callee_prompt.sql…
    Importing 20160823.2.extensions_fax_format.sql…
    Importing 20160823.faxes_table_update.sql…
    Importing 20160830.1.users_uid.sql…
    Importing 20160830.applications.sql…
    Importing 20160830.session_user_id.sql…
    Importing 20160831.nm_hints.sql…
    Importing 20160831.remove_user_notifications.sql…
    Importing 20160904.intrusion_reload.sql…
    Importing 20160905.1.cdr_filter_dst.sql…
    Importing 20160905.2.cdr_filter_src.sql…
    Importing 20160906.1.cdr_filter_customer_code.sql…
    Importing 20160906.time_cond_FK_fix.sql…
    Importing 20160906.user_uid.sql…
    Importing 20160912.1.cc_requests.sql…
    Importing 20160919.backup_and_restore.sql…
    Importing 20160920.set_defaults.sql…
    Importing 20161003.1.hot_desk_lang.sql…
    Importing 20161005.1.feature_codes_reorganize.sql…
    Importing 20161006.1.change_user_displayname.sql…
    Importing 20161010.1.inbound_route_extension.sql…
    Importing 20161019.1.default_cos.sql…
    Importing 20161025.status_report.sql…
    Importing 20161028.1.trunks_as_destinations.sql…
    Importing 20161028.2.outbound_as_destinations.sql…
    Importing 20161101.1.cdr_transit_calls.sql…
    Importing 20161104.1.rec_script_setting.sql…
    Importing 20161108.1.dictations_table.sql…
    Importing 20161114.1.export_extensions.sql…
    Importing 20161121.1.numbers_table.sql…
    Importing 20161123.1.default_feature_numbers.sql…
    Importing 20161204.1.cid_management.sql…
    Importing 20161204.2.cid_management.inbound.sql…
    Importing 20161204.2.cid_management.menu.sql…
    Importing 20161205.1.dial_profiles.sql…
    Executing 20161205.2.create_dial_profiles.php…
    Importing 20161205.3.drop_dialoptions.sql…
    Importing 20161209.2.nat_trunks.sql…
    Importing 20161210.1.feature.send_vm_msg.sql…
    Importing 20170101.1.epm_gs_devices.sql…
    Importing 20170101.2.gs_gac2500_settings.sql…
    Importing 20170101.3.gs_gxp21_35_70_settings.sql…
    Importing 20170122.1.ring_group_type.sql…
    Importing 20170122.1.vm_attach_default.sql…
    Importing 20170129.app_access.sql…
    Importing 20170212.1.cdr_utf8.sql…
    Importing 20170216.1.send_direct_vm.sql…
    Importing 20170221.1.remove_dpma.sql…
    Importing 20170223.1.custom_contexts.menu_and_privileges.sql…
    Importing 20170223.1.custom_contexts.table.sql…
    Importing 20170223.2.custom_contexts.destination.sql…
    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘ERROR 1146 (42S02) at line 4: Table ‘ombutel.ombu_destinations_category’ doesn’t exist
    ‘ in /usr/share/ombutel/scripts/apply_patches:0
    Stack trace:
    #0 /usr/share/ombutel/scripts/apply_patches(0): patcher::shellcmd()
    #1 /usr/share/ombutel/scripts/apply_patches(0): patcher->shellcmd()
    #2 /usr/share/ombutel/scripts/apply_patches(0): patcher->import_dbscript()
    #3 /usr/share/ombutel/scripts/apply_patches(0): patcher->apply()
    #4 {main}
    thrown in /usr/share/ombutel/scripts/apply_patches on line 0
    Done
    [root@vitalpbx scripts]# vitalpbx –dump-conf

    Applying Asterisk Configurations
    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘6bc3d6ed7a4295a522270cc381297148.tenant_id’ in ‘where clause’ With Query: select `6bc3d6ed7a4295a522270cc381297148`.`extension_id` as `extension_id`,`6bc3d6ed7a4295a522270cc381297148`.`extension` as `extension`,`6bc3d6ed7a4295a522270cc381297148`.`name` as `name`,`6bc3d6ed7a4295a522270cc381297148`.`language` as `language`,`6bc3d6ed7a4295a522270cc381297148`.`email` as `email`,`6bc3d6ed7a4295a522270cc381297148`.`class_of_service_id` as `class_of_service_id`,`6bc3d6ed7a4295a522270cc381297148`.`dial_profile_id` as `dial_profile_id`,`6bc3d6ed7a4295a522270cc381297148`.`call_limit` as `call_limit`,`6bc3d6ed7a4295a522270cc381297148`.`internal_cid` as `internal_cid`,`6bc3d6ed7a4295a522270cc381297148`.`external_cid` as `external_cid`,`6bc3d6ed7a4295a522270cc381297148`.`ringtime` as `ringtime`,`6bc3d6ed7a4295a522270cc381297148`.`n
    ospy` as `nospy`,`6bc3d6ed7a4295a522270cc381297148`.`enabled_pa` as `enabled_pa`,`6bc3d6ed7a4 in /usr/share/ombutel/www/includes/db.php on line 0
    Done
    [root@vitalpbx scripts]#

    0
    Up
    0
    Down

    Go to the ombutel folder

    cd /usr/share/ombutel

    Delete the custom context patch

    rm -rf patches/20170223.2.custom_contexts.destination.sql

    And try to build the DB again

    vitalpbx --build-db
    0
    minda
    Participant
    Up
    0
    Down

    I already reinstalled whole thing from the scratch as got frustrated with those errors. Thanks though for your support.

    0
Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.