HCoop
/
clinton
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6d52e26
)
Update change-user-password script to what we have now
author
bigmike160
<bigmike160>
Wed, 29 Aug 2007 18:47:26 +0000
(18:47 +0000)
committer
bigmike160
<bigmike160>
Wed, 29 Aug 2007 18:47:26 +0000
(18:47 +0000)
change-user-password
patch
|
blob
|
blame
|
history
diff --git
a/change-user-password
b/change-user-password
index
bb5b0c2
..
4a321f2
100755
(executable)
--- a/
change-user-password
+++ b/
change-user-password
@@
-10,5
+10,12
@@
USER=$1
sudo rm -f /tmp/kadmin.out
sudo kadmin.local -p root/admin -q "cpw $USER@HCOOP.NET" \
2>&1 | tee /tmp/kadmin.out
sudo rm -f /tmp/kadmin.out
sudo kadmin.local -p root/admin -q "cpw $USER@HCOOP.NET" \
2>&1 | tee /tmp/kadmin.out
+cat /tmp/kadmin.out | grep 'is too short while changing' && \
+ (echo == sending complaint to $USER@hcoop.net ====================================================;\
+ echo 'please change it' |\
+ mail -a 'From: Adam Megacz <megacz@hcoop.net>' \
+ -c admins@hcoop.net \
+ -s "your ~/.mire-password is too short" $USER@hcoop.net) || \
+ true
cat /tmp/kadmin.out | grep '\(Password for .* changed\|Cannot reuse password while changing password\)'
sudo rm -f /tmp/kadmin.out
cat /tmp/kadmin.out | grep '\(Password for .* changed\|Cannot reuse password while changing password\)'
sudo rm -f /tmp/kadmin.out