Adding an admin user in JIRA with embedded database

I was testing a JIRA migration today but when I restored the backup, I could not login anymore. The original system used external authentication (crowd) but that server was not available from my test machine. Oops, no users available, no ability to login.

After searching, I found the solution by modifying the database script. In the JIRA home directory, subdirectory database, add the following lines to the jiradb.script file:

INSERT INTO CWD_USER VALUES(999999,1,'localadmin','localadmin',1,'2012-01-04 19:49:08.864000000','2012-01-04 19:49:08.864000000','local','local','admin','admin','local admin','local admin','localadmin@localadmin.com','localadmin@localadmin.com','uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==')
INSERT INTO CWD_GROUP VALUES('888888','jira-administrators','jira-administrators',1,0,'2011-03-21 12:20:29.864000000','2011-03-21 12:20:29.864000000',NULL,NULL,'GROUP',1)
INSERT INTO CWD_GROUP VALUES('777777','jira-users','jira-users',1,0,'2011-03-21 12:20:29.864000000','2011-03-21 12:20:29.864000000',NULL,NULL,'GROUP',1)
INSERT INTO SCHEMEPERMISSIONS VALUES(444444,NULL,44,'group','jira-administrators')
INSERT INTO SCHEMEPERMISSIONS VALUES(333333,NULL,1,'group','jira-users')
INSERT INTO CWD_MEMBERSHIP VALUES(666666,888888,999999,'GROUP_USER','','jira-administrators','jira-administrators','localadmin','localadmin',1)
INSERT INTO CWD_MEMBERSHIP VALUES(555555,777777,999999,'GROUP_USER','','jira-users','jira-users','localadmin','localadmin',1)

Restarting JIRA you can now login using localadmin with password sphere.

Leave a Reply

Your email address will not be published. Required fields are marked *

question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen

*