3 ADMIN
=`whoami | sed s/_.*//`
4 echo "assuming that I am $ADMIN@fyodor..."
5 export PATH
=/afs
/hcoop.net
/common
/etc
/scripts
/:$PATH
7 for USERHOME
in `ssh $ADMIN@fyodor.hcoop.net cd /home\; find */.mire-password -size +0`; do
8 USER
=`dirname $USERHOME`
9 PATHBITS
=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER
11 echo == creating user
$USER ======================================================================
12 create-user
$USER && \
13 (ssh $ADMIN@fyodor.hcoop.net
cat /home
/$USER/.mire-password\
; cat /home
/$USER/.mire-password |\
14 change-user-password
$USER) && \
15 (echo == account created successfully
========================================================
16 echo == deleting .mire-password
=============================================================
17 ssh $ADMIN@fyodor.hcoop.net
'echo -n > /home/$USER/.mire-password'
18 echo == sending email to
$USER@hcoop.net
====================================================
20 mail -a 'From: Adam Megacz <megacz@hcoop.net>' \
21 -s "account created for user $USER" hcoop-sysadmin@hcoop.net
22 mail -a 'From: Adam Megacz <megacz@hcoop.net>' \
23 -s 'your account on mire.hcoop.net has been created' $USER@hcoop.net
<<EOF
26 ______________________________________________________________________________
29 Please remember that mire accounts are still in "beta testing", so we
30 cannot (yet) guarantee uptime or service. Please do not migrate
31 any important services to your mire account.
33 ______________________________________________________________________________
36 You can access your new account by typing:
38 ssh $USER@mire.hcoop.net
40 ... using the password previously in fyodor:~/.mire-password. For
41 security, that file has been blanked out.
43 ______________________________________________________________________________
46 Your AFS filespace is located at:
48 /afs/hcoop.net/user/$PATHBITS/
50 If you like, you can access this storage directly from your local
51 machine, without having to use ssh or scp. To do so, follow the
52 instructions at the link below, substituting "HCOOP.NET" and
53 "hcoop.net" for the realm name and cell name, respectively.
54 Capitalization matters.
56 http://research.cs.berkeley.edu/doc/afs/