J
J
John Smith2021-02-14 14:38:08
linux
John Smith, 2021-02-14 14:38:08

How to solve database.yml problem in Metasploit?

I can not connect the msf base.
It crashes every time it exits.

db_status
msf6 > db_status
[-] Error while running command db_status: FATAL: role "root" does not exist

Call stack:
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:696:in `rescue in connect'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:691:in `connect'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:413:in `with_connection'
/opt/metasploit-framework/embedded/framework/lib/msf/core/db_manager/connection.rb:118:in `connection_established?'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/data_service/proxy/core.rb:136:in `method_missing'
/opt/metasploit-framework/embedded/framework/lib/msf/ui/console/command_dispatcher/db.rb:1683:in `cmd_db_status'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:525:in `run_command'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:476:in `block in run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:470:in `each'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:470:in `run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:158:in `run'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in `start'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:in `start'
/opt/metasploit-framework/bin/../embedded/framework/msfconsole:23:in `'


db_connect
msf6 > db_connect -y database.yml
Connected to the database specified in the YAML file.
msf6 >

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Romses Panagiotis, 2021-02-14
@romesses

Try to double-check according to the instructions https://fedoraproject.org/wiki/Metasploit_Postgres...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question