Hi Martin,
Latest idmgr in the XS is broken. No laptops can register because the
database is still in the v2 format.
/home/idmgr/create_registration only creates a v2 database, and marks
the fs accordingly:
echo 2 > /home/idmgr/storage_format_version
The spec file would then ordinarily cause the upgrade_2_to_3 to be
run, but it doesn't because commit 5ef89de945 makes the spec file
update that file to '3'
I think you should remove the line of code that updates
/home/idmgr/storage_format_version from the spec file (since
create_registration does that), and update create_registration to make
a v3 db.
Also, xs-restore needs the attached patch. Can you throw that in at
the same time?
Thanks,
Daniel
--- create_user.orig 2009-07-29 15:55:26.000000000 +0545
+++ create_user 2009-07-29 15:54:19.000000000 +0545
@@ -37,16 +37,26 @@
exit 1
}
+PASSWD_ONLY=0
+# this option allows the homedir setup (including dealings with ssh key)
+# to be skipped. useful when restoring from backups.
+if [ '$1' == '--passwd-only' ]; then
+ PASSWD_ONLY=1
+fi
+
read username
read full_name
-read uuid #unused!
-read pubkey
+if [ '$PASSWD_ONLY' == '0' ]; then
+ read uuid #unused!
+ read pubkey
+fi
# check for sane values
export LC_ALL=C
echo "$username" | grep -s -E '^[A-Z]{3}[A-F0-9]{8}$' &> /dev/null || die "bad username"
-echo "$pubkey" | grep -s -E '^[A-Za-z0-9+/=]+$' &> /dev/null || die "bad public key"
-
+if [ '$PASSWD_ONLY' == '0' ]; then
+ echo "$pubkey" | grep -s -E '^[A-Za-z0-9+/=]+$' &> /dev/null || die "bad public key"
+fi
homedir=/library/users/$username
XO_USERS_GROUP=xousers
@@ -68,6 +78,8 @@
NEW_USER=1
fi
+[ '$PASSWD_ONLY' == '1' ] && exit 0
+
#from here, if a new user was created, a failure will leave the user
#there but unconfigured. So rather than simply dying, we try to clean
#up first.
@@ -90,4 +102,4 @@
chmod 600 .ssh/authorized_keys || clean_up_and_die "Unable to chmod authorized_keys"
chown -R $username .ssh || clean_up_and_die "Unable to chown .ssh"
-#clean_up_and_die goodbye
\ No hay ningún carácter de nueva línea al final del fichero
+#clean_up_and_die goodbye
_______________________________________________
Server-devel mailing list
[email protected]
http://lists.laptop.org/listinfo/server-devel