Now I've been reading on the Metasploit site and it seems to me that a lot of users have been having issues using db_autopwn. The most common problem would be that some exploits work manually but fail with autopwn or it fails to create a reverse shell or bind shell.

I've had that problem too but figured out how to solve it, seems like there's something wrong with the sqlite3. (Read this from the metasploit issue site) so now I will show you how to use PostgreSQL for autopwn.

Ok so after you install postgreSQL (it is installed by default in Backtrack) we need to configure it a little.

The first thing you will realise is that if you try to start it using:
Code:
/etc/init.d/postgresql-8.3 start (8.3 is the vesrion might be different in your case)
it gives you an error:

Code:
The PostgreSQL server failed to start. Please check the log output:
2008-03-24 18:46:11 CDT FATAL:  could not load server certificate file "server.crt": No such file or directory
                                                                                                                        [fail]
To solve this issue all you have to do is disable SSL from the postgres.conf file:

Code:
kate /etc/postgresql/8.3/main/postgresql.conf
Just comment the line "ssl = true # (change requires restart)" like this:

Code:
# - Security and Authentication -

#authentication_timeout = 1min		# 1s-600s
#ssl = true				# (change requires restart)
#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
					# (change requires restart)
#password_encryption = on
#db_user_namespace = off
Now that we've done that let's connect to our postgreSQL and change the password:

Code:
sudo su postgres -c psql
                               ALTER USER postgres WITH PASSWORD 'your password';

                               \q


                               sudo passwd -d postgres
                               sudo su postgres -c passwd
Now enter the same password that you used previously('your password').
After doing so we go to our framework folder:

Code:
cd /pentest/exploits/framework3
                              ./msfconsole
                              db_driver postgresql
                              db_connect postgres:"postgreSQL password"@127.0.0.1/metasploit ("metasploit" being the name of the database).
Now you can go use autopwn
Hope it helps someone.

P.S. Sorry if I have writing mistakes I wrote it very fast.