[GH-ISSUE #1495] Deprecate john.local.conf #967

Closed
opened 2026-10-14 03:30:14 +07:00 by bsakaguchi · 24 comments
Owner

Originally created by @magnumripper on GitHub (Jul 6, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1495

Originally assigned to: @magnumripper on GitHub.

The whole idea of john.local.conf was shot to pieces in 0aadb4ed when we started to install a "skeleton". It's too confusing to even try to explain to a user. Worse, it would be a total miracle if no maintainers of distro packages or binary tarballs have included skeleton files in a way that defeats the idea - they will again overwrite existing, possibly edited, files. I see no way to fix this - we have to deprecate that file.

To start with, stop creating skeleton files pronto. But we'll need to continue supporting existing files forever.

Originally created by @magnumripper on GitHub (Jul 6, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1495 Originally assigned to: @magnumripper on GitHub. The whole idea of john.local.conf was shot to pieces in 0aadb4ed when we started to install a "skeleton". It's too confusing to even try to explain to a user. Worse, it would be a total miracle if no maintainers of distro packages or binary tarballs have included skeleton files in a way that defeats the idea - they will again overwrite existing, possibly edited, files. I see no way to fix this - we have to deprecate that file. To start with, stop creating skeleton files pronto. But we'll need to continue supporting existing files forever.
bsakaguchi 2026-10-14 03:30:14 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@magnumripper commented on GitHub (Jul 6, 2015):

Some history in #725

<!-- gh-comment-id:118683112 --> @magnumripper commented on GitHub (Jul 6, 2015): Some history in #725
Author
Owner

@magnumripper commented on GitHub (Jul 6, 2015):

Even files from http://openwall.info/wiki/john/custom-builds (at least one, the first I checked) does contain a john.local.conf. Just as I thought. So any user upgrading from a tarball to another will have his settings destroyed. We should have seen this coming.

<!-- gh-comment-id:118684048 --> @magnumripper commented on GitHub (Jul 6, 2015): Even files from http://openwall.info/wiki/john/custom-builds (at least one, the first I checked) does contain a john.local.conf. Just as I thought. So any user upgrading from a tarball to another will have his settings destroyed. We should have seen this coming.
Author
Owner

@jfoug commented on GitHub (Jul 6, 2015):

it has been out own fault, for not treating that file in a manner similar to a .gitignore file. That file should be there and usable, even self created ONE time. But from that point on, it no longer exists in the eyes of this project. However, it was not done that way.

I would suggest that we look at a new 'local' override file, that IS designed in that manner. Yes, we can depricate this file, wash it away.... BUT we really need this local user override functionality, since the ./run/john.conf file IS owned by this project!!! That is the crux of the issue. That file is NOT user editable, but we sort of force the users to edit it.

I am also game to any OTHER ideas on how to go forward with setting custom setting within john.....

<!-- gh-comment-id:118688122 --> @jfoug commented on GitHub (Jul 6, 2015): it has been out own fault, for not treating that file in a manner similar to a .gitignore file. That file should be there and usable, even self created ONE time. But from that point on, it no longer exists in the eyes of this project. However, it was not done that way. I would suggest that we look at a new 'local' override file, that IS designed in that manner. Yes, we can depricate this file, wash it away.... BUT we really need this local user override functionality, since the ./run/john.conf file IS owned by this project!!! That is the crux of the issue. That file is NOT user editable, but we sort of force the users to edit it. I am also game to any OTHER ideas on how to go forward with setting custom setting within john.....
Author
Owner

@magnumripper commented on GitHub (Jul 6, 2015):

That file should be there and usable, even self created ONE time.

No we must not create it even one time, that very behavior is what blew it. We can't even touch it to create a zero-byte file if it doesn't exist. It's supposed to not exist at all until a user creates it. Current Jumbo doesn't require it to exist at all.

<!-- gh-comment-id:118761732 --> @magnumripper commented on GitHub (Jul 6, 2015): > That file should be there and usable, even self created ONE time. No we must not create it even one time, _that very behavior_ is what blew it. We can't even `touch` it to create a zero-byte file if it doesn't exist. It's supposed to **not exist at all** until a **user** creates it. Current Jumbo doesn't require it to exist at all.
Author
Owner

@frank-dittrich commented on GitHub (Jul 6, 2015):

Then create a john.local.conf-sample, and provide a special error message when including john.local.conf fails, suggesting to copy (and adjust the sample file).

<!-- gh-comment-id:118788313 --> @frank-dittrich commented on GitHub (Jul 6, 2015): Then create a john.local.conf-sample, and provide a special error message when including john.local.conf fails, suggesting to copy (and adjust the sample file).
Author
Owner

@magnumripper commented on GitHub (Jul 6, 2015):

Not a bad idea but I'm sure some/many maintainers would do that very copy (regardless of how we'd urge them not to do it) and then tar it up leaving us with status quo. Also it will cause everyone else to do that copy - still leaving everyone with a 4 KB skeleton file containing nothing.

Think telephone (or email) support: I wan't to be able to ask a user "Is there a john.local.conf in there?" and she can answer "no" and we're done with that part. Or if she answers "yes" it'd be 2-3 lines of actual config she can quote. Not a hundred lines of skeleton that we'd need to verify for actual content.

<!-- gh-comment-id:119004847 --> @magnumripper commented on GitHub (Jul 6, 2015): Not a bad idea but I'm sure some/many maintainers would do that very copy (regardless of how we'd urge them not to do it) and then tar it up leaving us with status quo. Also it will cause everyone else to do that copy - still leaving everyone with a 4 KB skeleton file containing nothing. Think telephone (or email) support: I wan't to be able to ask a user "Is there a john.local.conf in there?" and she can answer "no" and we're done with that part. Or if she answers "yes" it'd be 2-3 lines of actual config she can quote. Not a hundred lines of skeleton that we'd need to verify for actual content.
Author
Owner

@frank-dittrich commented on GitHub (Jul 6, 2015):

This is a default john.local.conf:

$ grep "^[^#;]" john.local.conf
[Local:Options]
[Local:Options:MPI]
[Local:Disabled:Formats]
[Local:Options:GPU]
[Local:Options:OpenCL]
[Local:PRINCE]
[Local:Markov:Default]
[Local:UserClasses]
[Local:Mask]
[Local:Regen_Salts_UserClasses]
[Local:Incremental:Custom]
[Local:Incremental:UTF8]
[Local:Incremental:Latin1]
[Local:Incremental:ASCII]
[Local:Incremental:LM_ASCII]
[Local:Incremental:LanMan]
[Local:Incremental:Alnumspace]
[Local:Incremental:Alnum]
[Local:Incremental:Alpha]
[Local:Incremental:LowerNum]
[Local:Incremental:UpperNum]
[Local:Incremental:LowerSpace]
[Local:Incremental:Lower]
[Local:Incremental:Upper]
[Local:Incremental:Digits]

So, it is easy to see that it is the default.

And if you are worried about john.local.conf changes, you can always request the user increases --versbosity, and make sure you print the required information somewhere.
OTOH, regarding support, what's the difference between an adjusted john.local.conf and an adjusted john.conf?

<!-- gh-comment-id:119006522 --> @frank-dittrich commented on GitHub (Jul 6, 2015): This is a default john.local.conf: ``` $ grep "^[^#;]" john.local.conf [Local:Options] [Local:Options:MPI] [Local:Disabled:Formats] [Local:Options:GPU] [Local:Options:OpenCL] [Local:PRINCE] [Local:Markov:Default] [Local:UserClasses] [Local:Mask] [Local:Regen_Salts_UserClasses] [Local:Incremental:Custom] [Local:Incremental:UTF8] [Local:Incremental:Latin1] [Local:Incremental:ASCII] [Local:Incremental:LM_ASCII] [Local:Incremental:LanMan] [Local:Incremental:Alnumspace] [Local:Incremental:Alnum] [Local:Incremental:Alpha] [Local:Incremental:LowerNum] [Local:Incremental:UpperNum] [Local:Incremental:LowerSpace] [Local:Incremental:Lower] [Local:Incremental:Upper] [Local:Incremental:Digits] ``` So, it is easy to see that it is the default. And if you are worried about john.local.conf changes, you can always request the user increases --versbosity, and make sure you print the required information somewhere. OTOH, regarding support, what's the difference between an adjusted john.local.conf and an adjusted john.conf?
Author
Owner

@frank-dittrich commented on GitHub (Jul 6, 2015):

Plus, if a distro creates a john.local.conf, you can still file a bug report (preferably during beta).
But may be more important would be to suggest distros include jumbo at all (instead of or in addition to core).

E.g., fedora 22 just includes core, no jumbo version.

$ john
John the Ripper password cracker, version 1.8.0
Copyright (c) 1996-2013 by Solar Designer
Homepage: http://www.openwall.com/john/
<!-- gh-comment-id:119008271 --> @frank-dittrich commented on GitHub (Jul 6, 2015): Plus, if a distro creates a john.local.conf, you can still file a bug report (preferably during beta). But may be more important would be to suggest distros include jumbo at all (instead of or in addition to core). E.g., fedora 22 just includes core, no jumbo version. ``` $ john John the Ripper password cracker, version 1.8.0 Copyright (c) 1996-2013 by Solar Designer Homepage: http://www.openwall.com/john/ ```
Author
Owner

@magnumripper commented on GitHub (Jul 6, 2015):

So, it is easy to see that it is the default.

Not to J Random Luser who you are talking to over the phone.

I suggest we just ditch the skeleton file but keep all functionality. Undocumented.

<!-- gh-comment-id:119013842 --> @magnumripper commented on GitHub (Jul 6, 2015): > So, it is easy to see that it is the default. Not to J Random Luser who you are talking to over the phone. I suggest we just ditch the skeleton file but keep all functionality. Undocumented.
Author
Owner

@magnumripper commented on GitHub (Jul 6, 2015):

OTOH, regarding support, what's the difference between an adjusted john.local.conf and an adjusted john.conf?

That's what is so sad about this issue. There is no difference. Both are too long to spot local settings with just a look. Both are overwritten with an update. The local one can only add confusion.

<!-- gh-comment-id:119014497 --> @magnumripper commented on GitHub (Jul 6, 2015): > OTOH, regarding support, what's the difference between an adjusted john.local.conf and an adjusted john.conf? That's what is so sad about this issue. There is no difference. Both are too long to spot local settings with just a look. Both are overwritten with an update. The local one can only add confusion.
Author
Owner

@jfoug commented on GitHub (Jul 26, 2015):

Ok, how about this:

  1. remove .include "$JOHN/john.local.conf" from the john.conf file
  2. rm john.local.conf from the github source
  3. add a new .include logic That will be .include 'file' This logic will load a .conf file (same as the others, BUT it will not care if the file does not exist.
  4. add .include '$JOHN/john-local.conf' and .include './john-local.conf' to the john.conf file.

How does the above steps sound?

<!-- gh-comment-id:124998424 --> @jfoug commented on GitHub (Jul 26, 2015): Ok, how about this: 1. remove `.include "$JOHN/john.local.conf"` from the john.conf file 2. rm john.local.conf from the github source 3. add a new .include logic That will be `.include 'file'` This logic will load a .conf file (same as the others, BUT it will not care if the file does not exist. 4. add `.include '$JOHN/john-local.conf'` and `.include './john-local.conf'` to the john.conf file. How does the above steps sound?
Author
Owner

@jfoug commented on GitHub (Jul 26, 2015):

@magnumripper and @frank-dittrich, have a look at 28a8632 I think this solves the issues you had with the john.local.conf file. NOTE, we would need to make some notification so that any user who HAS worked with his john.local.conf would know to move that to john-local.conf.

I added extra smarts, so that the file is loaded from 2 locations, and in a specific order. Thus if the file exists in the CWD, then it will take final precedence on setup. I may look at using this to 'undo' some of the issues we are seeing on the TS, and see if I can get it working right again.

<!-- gh-comment-id:125005385 --> @jfoug commented on GitHub (Jul 26, 2015): @magnumripper and @frank-dittrich, have a look at 28a8632 I think this solves the issues you had with the john.local.conf file. NOTE, we would need to make some notification so that any user who HAS worked with his john.local.conf would know to move that to john-local.conf. I added extra smarts, so that the file is loaded from 2 locations, and in a specific order. Thus if the file exists in the CWD, then it will take final precedence on setup. I may look at using this to 'undo' some of the issues we are seeing on the TS, and see if I can get it working right again.
Author
Owner

@jfoug commented on GitHub (Jul 26, 2015):

cad538c also needed to avoid having this file get into github from anywhere in the tree.

<!-- gh-comment-id:125008393 --> @jfoug commented on GitHub (Jul 26, 2015): cad538c also needed to avoid having this file get into github from anywhere in the tree.
Author
Owner

@frank-dittrich commented on GitHub (Jul 26, 2015):

I'd say: Let's create john.local.conf if it doesn't exists, except for RELEASE builds.
Distros should build SYSTEMWIDE packages anyway.
And nowadays distros often don't even overwrite config files in /etc, and instead create a copy *.rpmnew ...

May be we should discuss this on john-dev?

<!-- gh-comment-id:125009154 --> @frank-dittrich commented on GitHub (Jul 26, 2015): I'd say: Let's create john.local.conf if it doesn't exists, except for RELEASE builds. Distros should build SYSTEMWIDE packages anyway. And nowadays distros often don't even overwrite config files in /etc, and instead create a copy *.rpmnew ... May be we should discuss this on john-dev?
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

Ok, how about this:

  1. remove .include "$JOHN/john.local.conf" from the john.conf file
  2. rm john.local.conf from the github source
  3. add a new .include logic That will be .include 'file' This logic will load a .conf file (same as the others, BUT it will not care if the file does not exist.
  4. add .include '$JOHN/john-local.conf' and .include './john-local.conf' to the john.conf file.

How does the above steps sound?

No. 1 has to be reverted immediately because it breaks compatibility! Just re-add it in john.conf with single quotes. Add a comment that it's deprecated and './john-local.conf' should be used instead.

<!-- gh-comment-id:125037485 --> @magnumripper commented on GitHub (Jul 26, 2015): > Ok, how about this: > 1. remove `.include "$JOHN/john.local.conf"` from the john.conf file > 2. rm john.local.conf from the github source > 3. add a new .include logic That will be `.include 'file'` This logic will load a .conf file (same as the others, BUT it will not care if the file does not exist. > 4. add `.include '$JOHN/john-local.conf'` and `.include './john-local.conf'` to the john.conf file. > > How does the above steps sound? No. 1 has to be reverted immediately because it breaks compatibility! Just re-add it in john.conf with single quotes. Add a comment that it's deprecated and './john-local.conf' should be used instead.
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

I'd say: Let's create john.local.conf if it doesn't exists, except for RELEASE builds.

Why would we ever create it? We shouldn't. Doing that was the real WTF here.

<!-- gh-comment-id:125037532 --> @magnumripper commented on GitHub (Jul 26, 2015): > I'd say: Let's create john.local.conf if it doesn't exists, except for RELEASE builds. Why would we ever create it? We shouldn't. Doing that was the real WTF here.
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

NOTE, we would need to make some notification so that any user who HAS worked with his john.local.conf would know to move that to john-local.conf.

Please, no more added logic. Just that note in john.conf that the one with dot is deprecated in favor of the one with dash.

<!-- gh-comment-id:125038664 --> @magnumripper commented on GitHub (Jul 26, 2015): > NOTE, we would need to make some notification so that any user who HAS worked with his john.local.conf would know to move that to john-local.conf. Please, no more added logic. Just that note in john.conf that the one with dot is deprecated in favor of the one with dash.
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

The worst issue is not fixed: ./configure still produces a john.local.conf.

config.status: linking x86-64.h to arch.h
config.status: executing default commands
configure: creating ./fmt_externs.h
configure: creating ./fmt_registers.h
checking for john.local.conf... not found
configure: creating ../run/john.local.conf (with skeleton sections)

Configured for building John the Ripper jumbo:

This creation should just be dropped from configure, unconditionally.

<!-- gh-comment-id:125039259 --> @magnumripper commented on GitHub (Jul 26, 2015): The worst issue is not fixed: `./configure` still produces a john.local.conf. ``` config.status: linking x86-64.h to arch.h config.status: executing default commands configure: creating ./fmt_externs.h configure: creating ./fmt_registers.h checking for john.local.conf... not found configure: creating ../run/john.local.conf (with skeleton sections) Configured for building John the Ripper jumbo: ``` This creation should just be dropped from configure, unconditionally.
Author
Owner

@jfoug commented on GitHub (Jul 26, 2015):

The worst issue is not fixed: ./configure still produces a john.local.conf.

But that was because the file had to exist. Now that we have the ' ' includes, it no longer has to be there.
I will update the john.conf, and remove that from configure.ac

<!-- gh-comment-id:125040527 --> @jfoug commented on GitHub (Jul 26, 2015): > The worst issue is not fixed: ./configure still produces a john.local.conf. But that was because the file had to exist. Now that we have the ' ' includes, it no longer has to be there. I will update the john.conf, and remove that from configure.ac
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

It didn't have to exist. There was code to handle it for that very filename (and you dropped that in your commit in favor of single quotes, which is fine).

<!-- gh-comment-id:125041939 --> @magnumripper commented on GitHub (Jul 26, 2015): It didn't have to exist. There was code to handle it for that very filename (and you dropped that in your commit in favor of single quotes, which is fine).
Author
Owner

@jfoug commented on GitHub (Jul 26, 2015):

@magnumripper please comment after ca2f765 Is this issue completed?

<!-- gh-comment-id:125043438 --> @jfoug commented on GitHub (Jul 26, 2015): @magnumripper please comment after ca2f765 Is this issue completed?
Author
Owner

@jfoug commented on GitHub (Jul 26, 2015):

0c73b86 fixed a bug in john.conf. I added john.local.conf back in, but did it with C include (which is a comment in our config parser)

<!-- gh-comment-id:125043526 --> @jfoug commented on GitHub (Jul 26, 2015): 0c73b86 fixed a bug in john.conf. I added john.local.conf back in, but did it with C include (which is a comment in our config parser)
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

I believe this settles it, thanks!

<!-- gh-comment-id:125043766 --> @magnumripper commented on GitHub (Jul 26, 2015): I believe this settles it, thanks!
Author
Owner

@magnumripper commented on GitHub (Jul 26, 2015):

This had the unfortunate effect that latest john.conf is incompatible with slightly older binaries

Unknown directive in the .conf file:  '.include '$JOHN/john.local.conf''
Error in ../run/john.conf at line 3405

But now it's in there, so let's just live with that. Recent dynamic changes had similar problems.

It's mostly a nuisance when benchmarking latest ../run/john with some older eg. ../run/john-b4 or ../run/john-j1

<!-- gh-comment-id:125046894 --> @magnumripper commented on GitHub (Jul 26, 2015): This had the unfortunate effect that latest john.conf is incompatible with slightly older binaries ``` Unknown directive in the .conf file: '.include '$JOHN/john.local.conf'' Error in ../run/john.conf at line 3405 ``` But now it's in there, so let's just live with that. Recent dynamic changes had similar problems. It's mostly a nuisance when benchmarking latest `../run/john` with some older eg. `../run/john-b4` or `../run/john-j1`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#967
No description provided.