The Tuesday 2004-08-03 at 18:58 +0200, Christian Boltz wrote:
I have further info: [...]
- john -show /var/lib/secchk/passwd.14833 fopen: john.ini: No such file or directory
Try adding pwd in the line above this.
Ok. The piece of code now is: # Copy passwd file. Use unique name to avoid races when john takes very long SEC_PASSWD=$SEC_VAR/passwd.$$ unshadow /etc/passwd /etc/shadow > $SEC_PASSWD nice -n 1 john -single "$SEC_PASSWD" 1> /dev/null 2>&1 nice -n 1 john -rules -w:$SEC_VAR/dict "$SEC_PASSWD" 1> /dev/null 2>&1 #Cer pwd john -show "$SEC_PASSWD" | sed -n 's/:.*//p' > "$OUT" and the result is: + nice -n 1 john -single /var/lib/secchk/passwd.13362 + nice -n 1 john -rules -w:/var/lib/secchk/dict /var/lib/secchk/passwd.13362 + pwd /usr/lib/secchk + john -show /var/lib/secchk/passwd.13362 fopen: john.ini: No such file or directory
Are you in the directory containing john.ini? If not, maybe adding cd /directory/containing/inifile/ may help.
Notice that the script is SuSE's, not mine: I suppose they tested it. If such a thing was needed, they'd surely put a 'cd /var/lib/john/' there. Anyway, lets try it out: + sort + uniq + SEC_PASSWD=/var/lib/secchk/passwd.13569 + unshadow /etc/passwd /etc/shadow + nice -n 1 john -single /var/lib/secchk/passwd.13569 + nice -n 1 john -rules -w:/var/lib/secchk/dict /var/lib/secchk/passwd.13569 + pwd /var/lib/john + john -show /var/lib/secchk/passwd.13569 + sed -n 's/:.*//p' + '[' -s /tmp/.security.c13570/security.out ']' + rm -f /var/lib/secchk/passwd.13569 + /usr/lib/secchk/checkneverlogin + '[' -s /tmp/.security.c13570/security.out ']' Weird! It worked. So! They did NOT test it. :-/ (the man page mentions "(configurable in the configuration file, ~/john.ini)" - that's the home directory, not where it is. So... I modify script '/usr/lib/secchk/security-weekly.sh' as follows: if [ -x /usr/sbin/john -a -x /usr/sbin/unshadow ]; then #Cer pushd /var/lib/john ... #Cer popd fi Thanks for the tip! -- Cheers, Carlos Robinson