Que tal buen dia instale metasploit para probarlo y ver de que trataba pero me da un error al inicarlo [-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 7175?
Revise con un comando para ver si estaba iniciado el servicio de postgresql pero me di cuenta de que no y al tratar de iniciar la base de datos me da el siguiente error /etc/rc.d/rc.postgresql start
Starting PostgreSQL
You should initialize the PostgreSQL database at location /var/lib/pgsql/9.6/data
e.g. su postgres -c "initdb -D /var/lib/pgsql/9.6/data --locale=en_US.UTF-8 -A md5 -W"
me dice que no puedo inicar postgres con el usuario root pero al ejecutar el comando con un usuario normal de la siguiente manera
su postgres -c "initdb -D /var/lib/pgsql/9.6/data --locale=en_US.UTF-8 -A md5 -W"
Password:
me pide password se lo pongo y me dice que no es correcto.
tambien cuando ejecuto el comando de arriba siendo usuario normal me da el siguiente error
etc/rc.d/rc.postgresql start
Starting PostgreSQL
touch: cannot touch '/var/log/postgresql-9.6': Permission denied
chown: changing ownership of '/var/log/postgresql-9.6': Operation not permitted
chmod: changing permissions of '/var/log/postgresql-9.6': Operation not permitted
You should initialize the PostgreSQL database at location /var/lib/pgsql/9.6/data
e.g. su postgres -c "initdb -D /var/lib/pgsql/9.6/data --locale=en_US.UTF-8 -A md5 -W"
porque no me deja de ninguna de las dos formas ni siendo root ni con usuario normal?
Mi sistema es Slackware 14.2
Ya encontre como solucionar mi problema por si a alguien mas le pasa:
tengo que ejecutar este script.
#/opt/metasploit/postgresql/scripts/ctl.sh start
LOG: database system was interrupted; last known up at 2017-02-16 13:59:52 CST
/opt/metasploit/postgresql/scripts/ctl.sh : postgresql started at port 7175
LOG: database system was not properly shut down; automatic recovery in progress
LOG: record with zero length at 0/256C8A0
LOG: redo is not required
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
como ven me dice que se inicio postgresql en el piuerto 7175
y al ejecutar msfconsole:
# msfconsole
+-------------------------------------------------------+
| METASPLOIT by Rapid7 |
+---------------------------+---------------------------+
| __________________ | |
| ==c(______(o(______(_() | |""""""""""""|======[*** |
| )=\ | | EXPLOIT \ |
| // \\ | |_____________\_______ |
| // \\ | |==[msf >]============\ |
| // \\ | |______________________\ |
| // RECON \\ | \(@)(@)(@)(@)(@)(@)(@)/ |
| // \\ | ********************* |
+---------------------------+---------------------------+
| o O o | \'\/\/\/'/ |
| o O | )======( |
| o | .' LOOT '. |
| |^^^^^^^^^^^^^^|l___ | / _||__ \ |
| | PAYLOAD |""\___, | / (_||_ \ |
| |________________|__|)__| | | __||_) | |
| |(@)(@)"""**|(@)(@)**|(@) | " || " |
| = = = = = = = = = = = = | '--------------' |
+---------------------------+---------------------------+
=[ metasploit v4.7.0-1 [core:4.7 api:1.0]
+ -- --=[ 1131 exploits - 638 auxiliary - 180 post
+ -- --=[ 309 payloads - 30 encoders - 8 nops
me lo carga bien.....