Archive for April, 2010

Got this when played with Fastrack (updating etc):

FATAL:  could not load server certificate file “server.crt”:

msf > db_create pentest
[-]
[-] Warning: The db_create command is deprecated, use db_connect instead.
[-]          The database and schema will be created automatically by
[-]          db_connect. If db_connect fails to create the database, create
[-]          it manually with your DBMS’s administration tools.
[-]
createdb: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?
[-] Error while running command db_create: Failed to connect to the database: 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?

And here’s my solution:

root@bt:/etc/ssl/certs# make-ssl-cert generate-default-snakeoil –force-overwrite
root@bt:/etc/ssl/certs# ls server.crt
ls: cannot access server*: No such file or directory
root@bt:/etc/ssl/certs# ls ssl-cert-snakeoil.pem
ssl-cert-snakeoil.pem
root@bt:/etc/ssl/certs# ln -s ssl-cert-snakeoil.pem server.crt
root@bt:/etc/ssl/certs# ls server.crt
server.crt
root@bt:/etc/ssl/certs# /etc/init.d/postgresql-8.3 start
Starting PostgreSQL 8.3 database server: main.