In keeping alongside the Kali Linux Network Services Policy, at that topographic point are no network services, including database services, running on boot in addition to therefore at that topographic point are a twain of steps that involve to locomote taken inward gild to boot the bucket Metasploit upwards in addition to running alongside database support.
This postal service solves the next issues when starting Metasploit:
- [-] Error spell running ascendency db_connect: Failed to connect to the database: PG::Error: ERROR: permission denied to exercise database : CREATE DATABASE “metasploit3” ENCODING = ‘utf8’
- [-] Error spell running ascendency db_connect: Failed to connect to the database: FATAL: component subdivision “root” does non exist
- msf > db_status[*] postgresql selected, no connection
Start the Kali PostgreSQL Service
Metasploit uses PostgreSQL equally its database in addition to therefore it needs to locomote launched first.
service postgresql start
You tin verify that PostgreSQL is running past times checking the output of ss -ant in addition to making certain that port 5432 is listening.
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 :::22 :::*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 127.0.0.1:5432 *:*
LISTEN 0 128 ::1:5432 :::*
Start the Kali Metasploit Service
With PostgreSQL upwards in addition to running, nosotros side past times side involve to launch the metasploit service. The start fourth dimension the service is launched, it volition exercise a msf3 database user in addition to a database called msf3. The service volition too launch the Metasploit RPC in addition to Web servers it requires.
service metasploit start
Launch msfconsole inward Kali
Now that the PostgreSQL an Metasploit services are running, yous tin launch msfconsole in addition to verify database connectivity alongside the db_status ascendency equally shown below.
msfconsole
msf > db_status
[*] postgresql connected to msf3
msf >
Configure Metasploit to Launch on Startup
If yous would prefer to cause got PostgreSQL in addition to Metasploit launch at startup, yous tin role update-rc.d to enable the services equally follows.
update-rc.d postgresql enable
update-rc.d metasploit enable
I don’t claim ownership alongside this post, this is too available inward Kali Linux Official Documentation. I 1 time again propose readers to exercise about report in addition to read Kali Official Documentation.
Source: Starting Metasploit Framework
If you’re interested on how to role metasploit to pentest Windows 2003 Server, next guide volition cause got yous through pace past times pace procedures.
Hack Remote PC (Windows 2003 server) alongside Metasploits
Thanks for reading. Please share.
