Metasploit mailing list archives

problems using db_postgres and db_create


From: eakemu at hotmail.com (Eddie Akemu)
Date: Wed, 29 Apr 2009 11:24:08 +0000


Hi Bogdan

I have created the postgres part which went fine but I ran into errors when I did this 


msf > db_driver postgresql
[-] Unknown command: db_driver.
msf > 


Thanks for you help so far...

Kind regards 
Eddie Akemu
CISSP





 



Date: Wed, 29 Apr 2009 11:11:39 +0300
From: bogdan at generalconsult.ro
To: eakemu at hotmail.com
CC: framework at spool.metasploit.com
Subject: Re: [framework] problems using db_postgres and db_create

try this:

#su - postgres
$createuser metasploit3
$createdb metasploit3db
$psql
 >grant all privileges on database metasploit3db to metasploit3;
 >alter user metasploit3 with encrypted password 'meta';
 >\q

run the console:
msf> db_driver postgresql
 >db_create metasploit3:meta at localhost/metsaploit3db
 >db_disconnect
 >db_connect metasploit3:meta at localhost/metasploit3db
 >db_hosts
You should not see any output when you run db_hosts at this point.

You should see output at db_hosts after you have populated the database 
with:
 >db_nmap -n 10.0.0.0/8

Bogdan

Eddie Akemu wrote:

Hi 

I am trying to use Postgressql as a backend when I use db_autopwn. But 
I get this error message ...

msf > load db_postgres
[*] Successfully loaded plugin: db_postgres
msf > db_create
CREATE DATABASE
ERROR:  table "hosts" does not exist
NOTICE:  CREATE TABLE will create implicit sequence "hosts_id_seq" for 
serial column "hosts.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"hosts_pkey" for table "hosts"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
"hosts_address_key" for table "hosts"
ERROR:  table "services" does not exist
NOTICE:  CREATE TABLE will create implicit sequence "services_id_seq" 
for serial column "services.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"services_pkey" for table "services"
ERROR:  table "vulns" does not exist
NOTICE:  CREATE TABLE will create implicit sequence "vulns_id_seq" for 
serial column "vulns.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"vulns_pkey" for table "vulns"
ERROR:  table "refs" does not exist
NOTICE:  CREATE TABLE will create implicit sequence "refs_id_seq" for 
serial column "refs.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"refs_pkey" for table "refs"
ERROR:  table "vulns_refs" does not exist
ERROR:  table "notes" does not exist
NOTICE:  CREATE TABLE will create implicit sequence "notes_id_seq" for 
serial column "notes.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"notes_pkey" for table "notes"
[*] Database creation complete (check for errors)
[-] Error while running command db_create: This plugin failed to 
load:  Failed to connect to the database

Call stack:
/root/framework-3.2/plugins/db_postgres.rb:130:in `cmd_db_create'
/root/framework-3.2/lib/rex/ui/text/dispatcher_shell.rb:234:in `send'
/root/framework-3.2/lib/rex/ui/text/dispatcher_shell.rb:234:in 
`run_command'
/root/framework-3.2/lib/rex/ui/text/dispatcher_shell.rb:196:in 
`run_single'
/root/framework-3.2/lib/rex/ui/text/dispatcher_shell.rb:191:in `each'
/root/framework-3.2/lib/rex/ui/text/dispatcher_shell.rb:191:in 
`run_single'
/root/framework-3.2/lib/rex/ui/text/shell.rb:127:in `run'
./msfconsole:78

1. I have posgresql configure already
2. postgresql is running ..

Can you tell me what I am doing wrong. Thanks for your help in advance


P.s sorry I had to post twice as first post had no heading
 
Eddie Akemu
CISSP




 



------------------------------------------------------------------------
" Upgrade to Internet Explorer 8 Optimised for MSN. " Download Now 
<http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U>
------------------------------------------------------------------------

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework
  


_________________________________________________________________
Share your photos with Windows Live Photos ? Free.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.metasploit.com/pipermail/framework/attachments/20090429/8537b9a9/attachment.htm>


Current thread: