Running umask 077 beforehand ensures the newly created “mypasswd” file (or whatever you want to call it) is created with more relaxed permissions and can be used by John.

  1. First analyze hash type - john hashfile.hash
  2. Then crack hash - john hashfile.hash --wordlist=/usr/share/wordlists/rockyou.txt --format=Raw-SHA1
  3. Show the cracked password - john --show --format=Raw-SHA1 hashfile.hash OR john --show hashfile.hash