Adds fix for msfdb issues on Ubuntu #14759
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves #12098.
ENV['PATH'] = "/usr/lib/postgresql/12/bin:#{ENV['PATH']}"
has been added into themsfdb
script, this sets postgresql to be included within$PATH
. Prior to this change, this was something Ubuntu users had required to do manually as a fix.The user will also have to run
sudo adduser {your-user-name} postgres
to add themselves as a user for the postgres group. So I plan to make some changes to the wiki to step users through setting that up. I have added a mock for the wiki below.Before
After
Mock wiki update
I think adding the following in as a third step makes sense.
Environment
For testing I used a fresh Ubuntu VM and installed Metasploit via Git clone. Do not use the omnibus installer, as this bug is not present in that installation method as postgres comes embedded.
Once I had Metasploit cloned I just followed the wiki to get everything set-up. Once you have verified you're getting the original error.
Then add my change via
vim
and ensure the error is gone and./msfdb init
runs successfully.There may be smarter ways to test this, but thought I'd mention my method.
Add the following code:
into the following file, at
line 50
:Verification
List the steps needed to make sure this thing works
Environment
section./msfdb init
without receiving any errors.