Metasploit-framework: FATAL: password authentication failed for user "msf"

Created on 9 Mar 2018  路  10Comments  路  Source: rapid7/metasploit-framework

bro when i tried to open metasploit the following errors come up:
[i] Database already started
[i] The database appears to be already configured, skipping initialization
[-] Failed to connect to the database: FATAL: password authentication failed for user "msf"
FATAL: password authentication failed for user "msf"

                      ########                  #
                  #################            #
               ######################         #
              #########################      #
            ############################
           ##############################
           ###############################
          ###############################
          ##############################
                          #    ########   #
             ##        ###        ####   ##
                                  ###   ###
                                ####   ###
           ####          ##########   ####
           #######################   ####
             ####################   ####
              ##################  ####
                ############      ##
                   ########        ###
                  #########        #####
                ############      ######
               ########      #########
                 #####       ########
                   ###       #########
                  ######    ############
                 #######################
                 #   #   ###  #   #   ##
                 ########################
                  ##     ##   ##     ##
                        https://metasploit.com


   =[ metasploit v4.16.43-dev                         ]

  • -- --=[ 1742 exploits - 994 auxiliary - 301 post ]
  • -- --=[ 526 payloads - 40 encoders - 10 nops ]
  • -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

I installed Metasploit with:

  • [x] Kali package via apt

OS

What OS are you running Metasploit on?
kali linux 2018.1
what should i do.plzzzzz help me someone

Most helpful comment

Hi,

Try this when you're facing DB error for metasploit Kali linux 2018.2 (which i'm using right now):

Failed to connect to the database: FATAL: password authentication failed for user "msf"
FATAL: password authentication failed for user "msf"

OR

Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5433?

  1. root@kali:/usr/share/metasploit-framework/config# msfdb reinit
  2. root@kali:/usr/share/metasploit-framework/config# cp database.yml /root/.msf4/
  3. root@kali:/usr/share/metasploit-framework/config# service postgresql restart
  4. root@kali:/usr/share/metasploit-framework/config# msfconsole
    these few steps work for me!!!

All 10 comments

You might ask on the Kali support forums. The database setup scripts for Metasploit are maintained by the Kali packaging team. Thanks!

Hi,

Try this when you're facing DB error for metasploit Kali linux 2018.2 (which i'm using right now):

Failed to connect to the database: FATAL: password authentication failed for user "msf"
FATAL: password authentication failed for user "msf"

OR

Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5433?

  1. root@kali:/usr/share/metasploit-framework/config# msfdb reinit
  2. root@kali:/usr/share/metasploit-framework/config# cp database.yml /root/.msf4/
  3. root@kali:/usr/share/metasploit-framework/config# service postgresql restart
  4. root@kali:/usr/share/metasploit-framework/config# msfconsole
    these few steps work for me!!!

Try this when you're facing DB error for metasploit Kali linux 2018.2 (which i'm using right now):

I was trying out Kali running on the new Windows 10 Subsystem for Linux and tried to setup the db with systemctl which failed. The above worked perfectly. Thanks :)

1. msfdb reinit

you are my hero and the new KungFu Master

Erro

root@termux[metasploit-framework]:

msfconsole

[-] *rting the MetaspLoit Framework console...\
[-] * WARNING: No database support: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?

[-] *
[*] Starting the Metasploit Framework console.../

@The-mula

Termux is not officially supported. #11023

However, Metasploit reportedly does work with Termux.

Refer to the following for more information:

guys you could spent alot of times with that problem but u need Create same user same database and same password in postres apt first !@

Hi,

Try this when you're facing DB error for metasploit Kali linux 2018.2 (which i'm using right now):

Failed to connect to the database: FATAL: password authentication failed for user "msf"
FATAL: password authentication failed for user "msf"

OR

Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5433?

1. root@kali:/usr/share/metasploit-framework/config# msfdb reinit

2. root@kali:/usr/share/metasploit-framework/config# cp database.yml /root/.msf4/

3. root@kali:/usr/share/metasploit-framework/config# service postgresql restart

4. root@kali:/usr/share/metasploit-framework/config# msfconsole
   these few steps work for me!!!

this helped me out......thanks for the help

bro when i tried to open metasploit the following errors come up:
[i] Database already started
[i] The database appears to be already configured, skipping initialization
[-] Failed to connect to the database: FATAL: password authentication failed for user "msf"
FATAL: password authentication failed for user "msf"

                      ########                  #
                  #################            #
               ######################         #
              #########################      #
            ############################
           ##############################
           ###############################
          ###############################
          ##############################
                          #    ########   #
             ##        ###        ####   ##
                                  ###   ###
                                ####   ###
           ####          ##########   ####
           #######################   ####
             ####################   ####
              ##################  ####
                ############      ##
                   ########        ###
                  #########        #####
                ############      ######
               ########      #########
                 #####       ########
                   ###       #########
                  ######    ############
                 #######################
                 #   #   ###  #   #   ##
                 ########################
                  ##     ##   ##     ##
                        https://metasploit.com


   =[ metasploit v4.16.43-dev                         ]
  • -- --=[ 1742 exploits - 994 auxiliary - 301 post ]
  • -- --=[ 526 payloads - 40 encoders - 10 nops ]
  • -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

I installed Metasploit with:

  • [x] Kali package via apt

OS

What OS are you running Metasploit on?
kali linux 2018.1
what should i do.plzzzzz help me someone

--> Nexposes uses the same port as metasploit. whatever connects first works.

armitage --illegal-access=warn
msfrpcd start -P warn

work ?

Was this page helpful?
0 / 5 - 0 ratings