fix DBPATH to use rw vol, set system:anyuser=l on Maildir, note that you must be...
[clinton/scripts.git] / make-account-for-fyodor-user
index 132974b..94cd696 100755 (executable)
@@ -1,13 +1,61 @@
 #!/bin/bash
 
-for USERHOME in `ssh megacz@fyodor.hcoop.net cd /home\; find */.mire-password -size +0`; do
+ADMIN=`whoami | sed s/_.*//`
+echo "assuming that I am $ADMIN@fyodor..."
+
+for USERHOME in `ssh $ADMIN@fyodor.hcoop.net cd /home\; find */.mire-password -size +0`; do
   USER=`dirname $USERHOME`
+  PATHBITS=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER
 
   echo == creating user $USER ======================================================================
-  (ssh megacz@fyodor.hcoop.net cat /home/$USER/.mire-password\; cat /home/$USER/.mire-password) | \
+  (ssh $ADMIN@fyodor.hcoop.net cat /home/$USER/.mire-password\; cat /home/$USER/.mire-password) | \
     /afs/hcoop.net/common/etc/scripts/create-user $USER && (
       echo == account created successfully ========================================================
       echo == deleting .mire-password =============================================================
-      ssh megacz@fyodor.hcoop.net 'echo -n > /home/$USER/.mire-password'
+      ssh $ADMIN@fyodor.hcoop.net 'echo -n > /home/$USER/.mire-password'
+      echo == sending email to $USER@hcoop.net ====================================================
+      mail -s 'your account on mire.hcoop.net has been created' $USER@hcoop.net <<EOF
+Enjoy!
+
+______________________________________________________________________________
+BETA STATUS
+
+Please remember that mire accounts are still in "beta testing", so we
+cannot (yet) guarantee uptime or service.  Please do not migrate
+any important services to your mire account.
+
+______________________________________________________________________________
+SSH Access
+
+You can access your new account by typing:
+
+  ssh $USER@mire.hcoop.net
+
+... using the password previously in fyodor:~/.mire-password.  For
+security, that file has been blanked out.
+
+______________________________________________________________________________
+AFS (direct) Access
+
+Your AFS filespace is located at:
+
+  /afs/hcoop.net/user/$PATHBITS/
+
+If you like, you can access this storage directly from your local
+machine, without having to use ssh or scp.  To do so, follow the
+instructions at the link below, substituting "HCOOP.NET" and
+"hcoop.net" for the realm name and cell name, respectively.
+Capitalization matters.
+
+  http://research.cs.berkeley.edu/doc/afs/
+
+Sincerely,
+
+  - your hcoop admins
+
+EOF
+      echo
+      echo
+      echo
     )
 done