2-factor auth roundcube reset settings and login Emergency
You forgot your code, 2-factor auth in roundcube? you want to quickly access the mailbox in a simple way? This guide is for you.
The following description of how to reset your access emergency.
Necessity is the mother of inventions. Today we encountered a situation that was not going to log in to the box due to the auth code does not improve, I will describe to you how I restored painless access to the mailbox.
For a start, we log in to the database roundcube can use this data to the root or as we know the data directly into the database log it to her.
After passing to the base / roundcube panel Directadmin da_roundcube
go to tabeli users.
In it we are looking for an e-mail that was blocked and edit it.
We are interested in a table named preferences
It should be something like the one below:
1 | a:18:{s:11:"search_mods";a:15:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:10:"INBOX.Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:12:"INBOX.Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:5:"INBOX";a:3:{s:7:"subject";i:1;s:4:"from";i:1;s:2:"to";i:1;}s:4:"Sent";a:3:{s:7:"subject";i:1;s:4:"from";i:1;s:2:"to";i:1;}s:10:"INBOX.spam";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:20:"INBOX.oferty dla nas";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:11:"INBOX.Trash";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:5:"Trash";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:12:"INBOX.Krazet";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:17:"INBOX.ZUS Kadrowe";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:14:"INBOX.PRYWATNE";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:13:"INBOX.ALLEGRO";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:9:"Wycieczka";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}}s:17:"message_threading";a:11:{s:20:"FolderZam&APM-wienia";b:0;s:10:"INBOX.Spam";b:0;s:17:"INBOX.Sailing DAL";b:0;s:28:"INBOX.Brotherhood CCF.Brooth";b:0;s:15:"INBOX.FisherMan";b:0;s:17:"INBOX.ZUS Kadrowe";b:0;s:14:"INBOX.PRYWATNE";b:0;s:13:"INBOX.ALLEGRO";b:0;s:9:"Wycieczka";b:0;s:5:"INBOX";b:0;s:6:"Amazon";b:0;}s:16:"message_sort_col";s:4:"date";s:18:"message_sort_order";s:4:"DESC";s:17:"collapsed_folders";s:0:"";s:12:"preview_pane";s:1:"1";s:8:"show_sig";i:1;s:10:"reply_mode";i:1;s:12:"default_font";s:6:"Tahoma";s:17:"default_font_size";s:4:"14pt";s:19:"default_addressbook";s:1:"0";s:19:"autocomplete_single";b:0;s:8:"timezone";s:13:"Europe/Warsaw";s:16:"standard_windows";b:1;s:4:"skin";s:5:"larry";s:17:"check_all_folders";b:1;s:11:"client_hash";s:32:"0eeefb4184ced0bc6302c3e1770595ae";s:24:"twofactor_gauthenticator";a:3:{s:6:"secret";s:16:"7WY7WYHNOVTH7F3T";s:8:"activate";b:1;s:14:"recovery_codes";a:0:{}}} |
We are interested in this tip namely:
1 | "client_hash";s:32:"0eeefb4184ced0bc6302c3e1770595ae";s:24:"twofactor_gauthenticator";a:3:{s:6:"secret";s:16:"7WY7WYHNOVTH7F3T";s:8:"activate";b:1;s:14:"recovery_codes";a:0:{}}} |
We remove from it a fragment: right after that is client_hash:
1 | s:24:"twofactor_gauthenticator";a:3:{s:6:"secret";s:16:"7WY7WYHNOVTH7F3T";s:8:"activate";b:1;s:14:"recovery_codes";a:0:{}}} |
after a closed parenthesis add client_hash }
E end result should look like:
1 | client_hash";s:32:"0eeefb4184ced0bc6302c3e1770595ae";} |
A full entry:
1 | a:18:{s:11:"search_mods";a:15:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:10:"INBOX.Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:12:"INBOX.Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:5:"INBOX";a:3:{s:7:"subject";i:1;s:4:"from";i:1;s:2:"to";i:1;}s:4:"Sent";a:3:{s:7:"subject";i:1;s:4:"from";i:1;s:2:"to";i:1;}s:10:"INBOX.spam";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:20:"INBOX.oferty dla nas";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:11:"INBOX.Trash";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:5:"Trash";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:12:"INBOX.Krazet";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:17:"INBOX.ZUS Kadrowe";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:14:"INBOX.PRYWATNE";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:13:"INBOX.ALLEGRO";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:9:"Wycieczka";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}}s:17:"message_threading";a:11:{s:20:"FolderZam&APM-wienia";b:0;s:10:"INBOX.Spam";b:0;s:17:"INBOX.Sailing DAL";b:0;s:28:"INBOX.Brotherhood CCF.Brooth";b:0;s:15:"INBOX.FisherMan";b:0;s:17:"INBOX.ZUS Kadrowe";b:0;s:14:"INBOX.PRYWATNE";b:0;s:13:"INBOX.ALLEGRO";b:0;s:9:"Wycieczka";b:0;s:5:"INBOX";b:0;s:6:"Amazon";b:0;}s:16:"message_sort_col";s:4:"date";s:18:"message_sort_order";s:4:"DESC";s:17:"collapsed_folders";s:0:"";s:12:"preview_pane";s:1:"1";s:8:"show_sig";i:1;s:10:"reply_mode";i:1;s:12:"default_font";s:6:"Tahoma";s:17:"default_font_size";s:4:"14pt";s:19:"default_addressbook";s:1:"0";s:19:"autocomplete_single";b:0;s:8:"timezone";s:13:"Europe/Warsaw";s:16:"standard_windows";b:1;s:4:"skin";s:5:"larry";s:17:"check_all_folders";b:1;s:11:"client_hash";s:32:"0eeefb4184ced0bc6302c3e1770595ae";} |
Save the table and all.
We should have the opportunity to log on to our mailbox.
2-factor auth you can configure the settings of the new Roundcube.