|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 849 (0x351) Types: TextFile Names: »shadow.sh«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦3da311d67⟧ »./cops/1.04/cops_104.tar.Z« └─⟦6a2577110⟧ └─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦6a2577110⟧ »./cops/1.04/cops_104.tar« └─⟦this⟧ »cops_104/perl/shadow.sh«
#!/bin/sh # # Usage: shadow.stuff # # Extracts the correct info from shadow pass to use for processing with # the rest of the perl stuff # # The way you use this is just to type "shadow.stuff > tempfile"; # this will create a file, "tempfile" (or whatever), that *should* # be the equivalent to a normal password file. Of course, you'll have # to run this as root so that you can read the shadow password file. shadow=/etc/shadow passwd=/etc/passwd foo_pass=./shadow.tmp.$$ # foo_pass=shadow.pass cat $passwd $shadow | sort > $foo_pass awk -F: '{parray[$1] = $0":"parray[$1]} END { \ for (line in parray) { \ nf=split(parray[line], pline, ":"); \ if (pline[9] != "LOCKED" && nf == 13) { print pline[1]":"pline[9]":"pline[3]":"pline[4]":" \ pline[5]":"pline[6]":"pline[7]; \ } \ } \ }' $foo_pass rm $foo_pass