From: megacz Date: Tue, 1 May 2007 02:58:08 +0000 (+0000) Subject: add error detection to cpw in create-user X-Git-Url: http://git.hcoop.net/clinton/scripts.git/commitdiff_plain/75bbe01d4947851e7640aa5a0265486cf793e42a add error detection to cpw in create-user --- diff --git a/create-user b/create-user index d5f5a11..2c4e33a 100755 --- a/create-user +++ b/create-user @@ -215,6 +215,11 @@ fs checkvolumes # # Finally, set password for main user's principal # Aborting this operation is harmless. Just re-invoke cpw. +# +# kadmin.local doesn't report errors properly, so we have to +# check manually # -sudo kadmin.local -p root/admin -q "cpw $USER@HCOOP.NET" +sudo kadmin.local -p root/admin -q "cpw $USER@HCOOP.NET" \ + 2>&1 | grep 'Password for .* changed' || \ + (echo "*** kadmin.local -q cpw failed!"; exit -1)