Hello,
we are trying to create a new user with administrative privileges in a database, as we had Crowd connected to Jira, but due to a network migration, the contact between Crowd and Jira was interrupted.
In the Jira database (postgresql 7), we have found out that the internal directory is empty.
jira-# where g.group_name = 'jira-administrators' and d.directory_type='INTERNAL';
id | user_name | directory_id
----+-----------+--------------
(0 rows)
We have (probably) enabled it through
<span>update</span> cwd_directory <span>set</span> active <span>=</span> <span>1</span> <span>where</span> id <span>=</span> <span>1</span><span>;</span>
But then we were unable to add the new admin user - we have tried to add him through
<span>insert</span> <span>into</span> cwd_user <span>values</span> <span>(</span><span>999999</span><span>,</span><span>1</span><span>,</span><span>'localadmin'</span><span>,</span><span>'localadmin'</span><span>,</span><span>1</span><span>,</span><span>'2012-01-04 19:49:05-08'</span><span>,</span><span>'2012-01-04 19:49:05-08'</span><span>,</span><span>'local'</span><span>,</span><span>'local'</span><span>,</span><span>'admin'</span><span>,</span><span>'admin'</span><span>,</span><span>'local admin'</span><span>,</span><span>'local admin'</span><span>,</span><span>'localadmin@localadmin.com'</span><span>,</span><span>'localadmin@localadmin.com'</span><span>,</span><span>'uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ=='</span><span>,</span><span>NULL</span><span>,</span><span>NULL</span><span>)</span><span>;</span>
<span>insert</span> <span>into</span> app_user <span>values</span><span>(</span><span>999999</span><span>,</span><span>'localadmin'</span><span>,</span><span>'localadmin'</span><span>)</span><span>;</span>
But Jira told us that there is already an user with ID 999999. However, the internal directory was empty.
jira=# insert into cwd_user values (999999,1,'localadmin','localadmin',1,'2012-01-04 19:49:05-08','2012-01-04 19:49:05-08','local','local','admin','admin','local admin','local admin','localadmin@localadmin.com','localadmin@localadmin.com','uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==',NULL,NULL);
ERROR: duplicate key value violates unique constraint "pk_cwd_user"
DETAIL: Key (id)=(999999) already exists.
jira=# insert into app_user values(999999,'localadmin','localadmin');
ERROR: duplicate key value violates unique constraint "pk_app_user"
DETAIL: Key (id)=(999999) already exists.
We then have tried to add users through several ways, first
insert into cwd_user(id, user_name, lower_user_name, active, created_date, updated_date, first_name, lower_first_name, last_name, lower_last_name, display_name, lower_display_name, email_address, lower_email_address, directory_id, credential)
jira-# values (1212121, 'admin', 'admin', 'T', '2009-11-26 17:42:08', '2009-11-26 17:42:08', 'A. D.', 'a. d.', 'Ministrator', 'ministrator', 'A. D. Ministrator', 'a. d. ministrator', 'admin@example.com', 'admin@example.com', (select id from cwd_directory where directory_type='INTERNAL'), '{PKCS5S2}gf02gc7VU5aYsgWfRG0S4PD1MxPdfLxq7c7PO/DSkq0rSnw/mMv6UpSRUkD2+kyP');
However, all we got was an error
ERROR: invalid input syntax for type numeric: "T"
LINE 2: values (1212121, 'admin', 'admin', 'T', '2009-11-26 17:42:0...
^
This happened everytime we tried a command that contained 'T', ex.
jira=# update cwd_directory set active = 'T' where id = (select id from cwd_directory where directory_type='INTERNAL');
ERROR: invalid input syntax for type numeric: "T"
LINE 1: update cwd_directory set active = 'T' where id = (select id ...
We're at the end of our rope here. How can we...
1) Ensure the Jira internal directory is working
2) And add a user with administrative privileges through which we could work with Jira?
We could really use the assistance, please.