[ODK Developers] Setting up default user account when building Aggregate from source


There's a security.properties file that includes by default:


For the latter (which defaults to blank), you can put in a username that
will, by default, be able to login with the password mentioned in the
securities.properties comments.

By default, this security.properties file gets bundled
into WEB-INF/lib/odk-mysql-it-settings-latest.jar. What I do is place a
customized security.properties (and jdbc.properties) into WEB-INF/classes.
There, the customized ones override the ones in the .jar (and that way I
leave the source tree alone and just override the properties in my Tomcat
run-time directory). If you either put your Gmail in for superUser or put
in a name for superUserUsername, then you'll be able to login even when the
database starts out blank (i.e., when it doesn't have user records yet).

Hope that helps,


ยทยทยท On Thursday, August 30, 2012, wrote:

Hey Everyone,

I want to make some coding changes to Aggregate. I started by installing
Aggregate on Tomcat/MySQL using the installer, that worked fine. Then I
downloaded the source, after carefully reading, and re-reading, the
CONFIGURE.TXT Maven was able to build a WAR with out error.

Tomcat runs the WAR with out problem, but I'm not able to log in. I've
tried using Anonymous Access, but that just re-directs to
http://localhost:8080/aggregate-mysql-1.0/openid_login.html, I've tried
Sign in with Google using the Google ID, I put in the Maven settings.xml
file, but that just gives me a 401 error.

After some thinking I enabled the anonymous account in my Aggregate
instance that I installed from the installer, then copied the database into
the ODK_unit database created by Maven, and now I can log in as anonymous,
but I don't have any administrative access. I've tried coping the database
with an administrative account already setup, but that doesn't work.

So any advice on how to log in with admin privileged to an ODK aggregate
instance that's been built from source code would be greatly appreciated.