Manually create user account via mqsql in confluence?

I cannot log into confluence and the installation is not linked my working Jira.

Is it possible to create a confluence account via my mysql datbase? If so, how? I need to login in order to see all of posts which I see are all in the database connected to mysql.

Also what do I change so that JIRA is linked at the left menu as a second choice? I currently see two confluence links. Both have the same url. 

1 answer

0 votes

It's an option, but it would be better and easier to get your existing accounts admin rights.  It's very important that Confluence is stopped while you do this.  See https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html

 

There are no users or administrators in the confluence database. I am certain of this.

Mmm, then there's very little chance that anything is going to work - how did you manage to destroy the user lists?

It may be possible to undo that, but if not, then the doc I gave does have a last-resort of adding a new admin user.

 

There are no users in the original database too. Is it possible it was using the JIRA database for the users? Also, I started off without a database to begin with.

The steps to add an admin user do not work.

I see all of the body content in the database though.

It could have been using JIRA, but that still comes back to the question of how you managed to break it - what did you change that made it stop working?

The Confluence "getting an admin account" work fine for me (I've used it 8 or 9 times on one of my current projects, so I know it works)

Well, it was originally on a different domain and different port so I replaced everything with the old url to the new one.

I also did not back up via the software before I rebuilt the original server. I am using the database from mysql. It was originally in Linux and now I'm using Windows.

Is there a way via the database to connect confluence back to Jira?

Also, is there anyone that could manually help me with this? I'm sure it's not complicated for people who know the software and mysql well.

The problem here is that you've inadvertently destroyed information that's needed to tell you what to do to recover it.

Yes, you can manually create a new admin user, but you've said it doesn't work (although not why it doesn't work, when it works for others).  My fear about trying to connect to another system for authentication is that you don't know that was working before, so you could be running off down completely the wrong path (and it's harder than creating a new admin user)

You could try https://support.atlassian.com too - they're there to help with the ones the community can't help you with directly.

Your initial link has nothing to do with creating a brand new admin.

It did 2 years ago.

You should not be trying to create a new admin any more.  Use the link to recover the existing admin account, then log in as the admin and add other admins.

The issue I'm having is all of the current admins are having a not permitted error on every single webpage in Confluence. The LDAP is not set up yet so that may be why but the localadmin account on the internal directory should be able to access it but it's still not working.

That suggests the internal directory is disabled or that there is an admin account in your LDAP masking the local one (for example, if you have "admin" internally and "admin" in LDAP and LDAP is higher on the list than internal, then it will be trying that one, even though LDAP is not functional)

You'll need to try some database tricks.  Stop Confluence and go look at the CWD_DIRECTORY table.  There will be at least LDAP and Internal in there.  Check that Internal is enabled, then either reverse the order of them, or disable LDAP.  This will make Confluence check the internal directory and the local account should be able to get in then.

Thanks for the help. The issue is that I am on the older Confluence, specifically the one with os_user, os_group, and os_user_group. Can you link me to an article on how to disable LDAP on debian? I believe that is my only option at this point.

Ah, that's a totally different case then, as you're on Confluence 3.4.9 or lower.

Start again, at https://confluence.atlassian.com/display/CONF256/Restoring+Passwords+To+Recover+Admin+User+Rights

(And when you've got it working, seriously consider an upgrade...)

See I tried this, the issue is no matter who's password I change, the LDAP is in front of the local directory so I need to disable LDAP because this is just a staging server and I won't be able to connect to the LDAP server. 

Mmm, you might find you have no internal directory, but you should be able to remove LDAP.

There's a file called atlassian-user.xml which is where you define the LDAP server(s).  I think it might be under confluence/WEB-INF/classes, but I'm not sure.

If you comment or remove the LDAP connection in there, it should stop trying to use it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

104 views 1 14
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you