Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#24 Metasploit seems to run only under root

WTF v2.0
pending
Raul Siles
None
5
2013-05-01
2012-08-17
Steve Steiner
No

Tried to run msfconsole as the samurai user and keep getting an error attempting to connect to the database, works fine when run via sudo. Is this supposed to be how it works, or should the samurai user allowed to run metasploit?

Discussion

  • Steve Steiner
    Steve Steiner
    2012-08-17

    Output of running msfconsole as samurai user

     
  • Raul Siles
    Raul Siles
    2012-09-08

    The error is:
    [-] Warning, /usr/share/metasploit/config/database.yml is not readable. Try running as root or chmod.
    [-] No database definition for environment

    Solution:

    $ sudo chmod 744 /usr/share/metasploit/config/database.yml
    $ sudo chown samurai:samurai /home/samurai/.msf4/schema/

    This will be fixed in 2.1.