home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cops_104.zip / cops_104 / docs / readme.apollo < prev    next >
Text File  |  1992-03-10  |  2KB  |  62 lines

  1.  
  2.   Try setting the $OVER_8 variable (line 50) in "passwd.chk" to "YES",
  3. if you get warnings about having extra long uid's.
  4.  
  5.  
  6.   This little script can be used to generate a better password file for
  7. the password cracker, if you use those funky more-than-one-field in field
  8. one of the password file; e.g., if you have something that looks like:
  9.  
  10. root.foo.bar:xxxxxxxxxxxxx:0:0:Mr. Fu Bear:/:/bin/sh
  11.  
  12.   This will change it to:
  13.  
  14. root:xxxxxxxxxxxxx:0:0:foo bar Mr. Fu Bear:/:/bin/sh
  15.  
  16.   So that you can use the extra fields as gcos information for password
  17. cracking.  You can substitute the normal password cracking stuff in "cops"
  18. ("pass.chk") with something like (assuming you call this "apollo.sh"):
  19.  
  20. apollo.sh > ./apollo.pw.$$
  21. pass.chk -P ./apollo.pw.$$
  22. rm -f ./apollo.pw.$$
  23.  
  24.  
  25.   In addition, you can add these 2 lines to the "passwd.chk" shell script
  26. (right before the start of the awk on line 82 would be fine):
  27.  
  28. $AWK -F: '{print $1}' $etc_passwd | $AWK -F. '{if (NF > 3)
  29.         printf("Warning!  Password file, line %d, has %d sub-fields in the user field: \n\t%s\n", NR, NF, $0) }'
  30.  
  31.   And if you're running YP (is that possible, with all of that?  :-)
  32. You can add these 2 lines before line 119:
  33.  
  34. $AWK -F: '{print $1}' $yp_passwd | $AWK -F. '{if (NF > 3)
  35.         printf("Warning!  YPassword file, line %d, has %d sub-fields in the user field: \n\t%s\n", NR, NF, $0) }'
  36.  
  37.  
  38. :
  39. #
  40. #  apollo.pw
  41. #
  42. AWK=/bin/awk
  43.  
  44. # Quote from the man page (passwd):
  45. # On DOMAIN systems, passwords are kept in the registry files (/registry/*).
  46. #
  47. # Important files:
  48. etc_passwd=/etc/passwd
  49.  
  50. $AWK -F: '{split($1,temp,"."); \
  51.         $1=temp[1]; \
  52.         for (i in temp) {
  53.             if (i!=1) \
  54.                 $5 = $5" "temp[i]; \
  55.             } \
  56.         for (j=1;j<=NF;j++)
  57.             printf("%s:",$j); \
  58.         printf("\n") \
  59.         }' $etc_passwd
  60.  
  61. # end
  62.