John: fopen: /usr/local/share/john/john.conf: No such file or directory. Is it reproducible?

after install john and run it, i got this:

$ john
fopen: /usr/local/share/john/john.conf: No such file or directory

As i checked it, /usr/local/share/john not even exist. Is there anyone help me to test is it reproducible?

My Versions:

macOS 10.14.6

$ brew --version
Homebrew 2.1.16
Homebrew/homebrew-core (git revision 992e8; last commit 2019-11-25)
Homebrew/homebrew-cask (git revision 9182f; last commit 2019-11-25)

BTW, this is how i fix it manually:

cd /usr/local/share
ln -s /usr/local/Cellar/john/1.9.0/libexec john
cd john
cp john.ini john.conf

and now it seem works.

1 Like

Could you report a github issue for this?

OK, I will create a issue now.

Close but only works if you have run brew from your local user. IMO not a good idea. I run brew as a privileged separate user, and login / use the mac as a low-priv user.

So here are the missing bits:

# install package
brew install john
# setup the folder
sudo ln -s /usr/local/Cellar/john/1.9.0/libexec /usr/local/share/john
# setup the configuration file
sudo ln -fs /usr/local/share/john/john.ini /usr/local/share/john/john.conf
# handle permissions (by default john allows only brew user to execute)
sudo chmod 0644 /usr/local/share/john/*
# make the "john" app executable (it's not by default)
sudo chmod +x /usr/local/Cellar/john/1.9.0/libexec/john

All done!

This is potentially true for all of homebrew since multi-user setups aren’t supported and might break at any minute.

I hear you but respectfully disagree on the “break at any minute” statement.

Certainly some items installed under another user (such as full OpenCV) are problematic to run as a local user. Certainly having a different owner for the brew items under /usr items than the logged-in user also can cause specific issues.

But I have been running an entire lab of MacBooks, auto-configured with Chef, use brew under a dedicated separate account, since 2014 with great success. Everything from Eclipse to Vagrant to Wireshark - I can push down from policy, manage versions, etc. Saves me much time.

In general I find it disheartening to find that, in practice, applications from brew to AWS CloudFormation example templates (CreateRole?? Really?) to various Windows tools - actually assume that the user is of course running as admin (or with sudo privs - which is basically the same thing). That’s all.

You can disagree but none of the maintainers uses this setup and it can still break at any time since nobody is developing with this scenario in mind.