3 # Finally, set password for main user's principal
4 # Aborting this operation is harmless. Just re-invoke cpw.
6 # kadmin.local doesn't report errors properly, so we have to
10 sudo
rm -f /tmp
/kadmin.out
11 sudo kadmin.
local -p root
/admin
-q "cpw $USER@HCOOP.NET" \
12 2>&1 |
tee /tmp
/kadmin.out
13 cat /tmp
/kadmin.out |
grep '\(is too short while changing\|does not contain enough\)' && \
14 (echo == sending complaint to
$USER@hcoop.net
====================================================;\
15 echo 'please change it' |\
16 mail -a 'From: Adam Megacz <megacz@hcoop.net>' \
18 -s "your ~/.mire-password is too short or not complex enough" $USER@hcoop.net
) || \
20 cat /tmp
/kadmin.out |
grep '\(Password for .* changed\|Cannot reuse password while changing password\)'
21 sudo
rm -f /tmp
/kadmin.out