security.d/chk_passwd

changeset 9
3b982acb3d07
parent 7
2c71590b2373
child 13
cc078ac2fddd
equal deleted inserted replaced
8:5209729bbbac 9:3b982acb3d07
50 TMP2=secure1.$$ 50 TMP2=secure1.$$
51 MPBYUID=secure2.$$ 51 MPBYUID=secure2.$$
52 COMBINED=secure3.$$ 52 COMBINED=secure3.$$
53 OUTPUT=secure4.$$ 53 OUTPUT=secure4.$$
54 54
55
55 # Combine passwd and shadow files. 56 # Combine passwd and shadow files.
56 # 57 #
57 join --nocheck-order -t : -j 1 $MP $SP > $COMBINED 58 JOPT=$( join --help | grep "\--nocheck-order")
59 if [ -z "$JOPT" ]; then
60 join -t : -j 1 $MP $SP > $COMBINED
61 else
62 join --nocheck-order -t : -j 1 $MP $SP > $COMBINED
63 fi
58 64
59 65
60 # These are used several times. 66 # These are used several times.
61 # 67 #
62 awk -F: '!/^+/ { print $1 " " $3 }' $MP | sort -k2n > $MPBYUID 68 awk -F: '!/^+/ { print $1 " " $3 }' $MP | sort -k2n > $MPBYUID

mercurial