Make `new-user' half-work again
authorclinton_admin <clinton_admin@deleuze.hcoop.net>
Mon, 12 Dec 2011 19:52:55 +0000 (14:52 -0500)
committerclinton_admin <clinton_admin@deleuze.hcoop.net>
Mon, 12 Dec 2011 19:52:55 +0000 (14:52 -0500)
* (Non-Working) LDAP stuff disabled
* Run `create-user' on fritz
* Disable setting password (has to be done manually for now)
* Portal has to move to either storing passwords in afs or running on
  fritz (or both)

new-user

index 345f105..cef1f60 100755 (executable)
--- a/new-user
+++ b/new-user
@@ -20,35 +20,35 @@ fi
 #
 # Create user
 #
-/afs/hcoop.net/common/etc/scripts/create-user $USERNM || \
+ssh -K fritz.hcoop.net  /afs/hcoop.net/common/etc/scripts/create-user $USERNM || \
 ( echo "create-user $USERNM failed" && exit 2 )
 
 #
 # Entry in LDAP is created, set real name
 #
-echo "
-dn: uid=$USERNM,ou=People,dc=hcoop,dc=net
-changetype: modify
-replace: gecos
-gecos: $REALNM
-" | sudo ldapmodify -x -D cn=admin,dc=hcoop,dc=net -y /etc/ldap.secret || \
- (echo Error modifying LDAP entry && exit 3 )
+#echo "
+#dn: uid=$USERNM,ou=People,dc=hcoop,dc=net
+#changetype: modify
+#replace: gecos
+#gecos: $REALNM
+#" | sudo ldapmodify -x -D cn=admin,dc=hcoop,dc=net -y /etc/ldap.secret || \
+# (echo Error modifying LDAP entry && exit 3 )
 
 #
 # Now set the password
 #
-if ! test -r "$PWFILE"; then
-       echo "Skipping password set from $PWFILE (doesn't exist or permission denied)"
-       #exit 4
-else
-       echo Setting password from $PWFILE
-       sudo sh -c "cat $PWFILE | tee -| /afs/hcoop.net/common/etc/scripts/change-user-password $USERNM" || \
-       ( echo "cat $PWFILE | tee - | change-user-password $USERNM failed" && exit 5 )
+#if ! test -r "$PWFILE"; then
+#      echo "Skipping password set from $PWFILE (doesn't exist or permission denied)"
+#      #exit 4
+#else
+#      echo Setting password from $PWFILE
+#      sudo sh -c "cat $PWFILE | tee -| /afs/hcoop.net/common/etc/scripts/change-user-password $USERNM" || \
+#      ( echo "cat $PWFILE | tee - | change-user-password $USERNM failed" && exit 5 )
 
        # Delete password file
        #sudo rm -- "$PWFILE"
-       echo "Not deleting $PWFILE. Enable it in the script when you want"
-fi
+#      echo "Not deleting $PWFILE. Enable it in the script when you want"
+#fi
 
 
 #