Just migrated from cloud to server and there is no admin user (no external db)
Asked by admin:

I can not log in because my admin doesnt work. and I can not resend pw because there is no email configured. Isn?t it strange that I have done a migration with 1 user (admin) and now it is not loggable?


Answers:
author: admin

author: Nic Brough -Adaptavist-
body: The docs say a system admin account called sysadmin with a password of sysadmin will be created in the export, and you'll need to use that to grant users the rights they need

comments: author: admin
body: Unfortunately that doesn?t work, and that page of the documentation [seems deleted](https://confluence.atlassian.com/search/?queryString=sysadmin%20more%3Aconfluenceallversions)


author: Nic Brough -Adaptavist-
body: <https://confluence.atlassian.com/confeval/jira-software-evaluator-resources/jira-software-migrating-from-cloud-to-server> and <https://confluence.atlassian.com/adminjiraserver074/migrating-from-jira-cloud-to-server-applications-881683278.html> do not seem deleted to me.

If the password for sysadmin is not sysadmin, then the question is what did you change it to?


author: admin
body: We are talking about Confluence server, not Jira, right?


author: Nic Brough -Adaptavist-
body: Ah, sorry, I went for the standard bookmarks.

IT's <https://confluence.atlassian.com/confcloud/migrate-from-confluence-cloud-to-server-724765578.html>

Which uses the same user and password, so it's the same problem.

Your options if you've forgotton what you changed the password to are:

* Re-import the Cloud backup, as it'll have sysadmin/sysadmin in it
* Hack the password in the database. This might be hard if you're using the internal demo database though


author: admin
body: I have reinstalled everything, no errors, PostgreSQL ok, license ok, cloud backup ok, and same error: sysadmin user/pw does not work.

:(


author: AnnWorley
body: Let's go the "hack the password in the database" route mentioned by Nic:

[Restore Passwords To Recover Admin User Rights](https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html)

Since you are using PostgreSQL and not the embedded database, it is pretty straightforward.


author: admin
body: I am following that guide, useful, but I am still trying to achieve the first step (DBV installed and connected to the DB)

![Sin t?tulo.png](https://community.atlassian.com/t5/image/serverpage/image-id/5056i1B746D3D063DAC4B/image-dimensions/325x131?v=v2 "Sin t?tulo.png")

That code goes...?


author: Nic Brough -Adaptavist-
body: I don't understand the question. You say you are stuck on the first step and then paste in a query that is the next step. In neither case do you explain the problem you are having.

Where are you actually stuck?


author: admin
body: This code: where shoud I paste it in DBVisualiser. It is connected to de DB, I have been looking for that some kind of box to type but I just find menus and buttons...


author: Nic Brough -Adaptavist-
body: Ah, ok. I don't know, I don't use DBVisualiser. I go with command line mostly. There should be an option for "run plain sql" somewhere in it.


author: admin
body: Ty for your patience, Nic. I am learning a ton today.

I found it but it only shows in paid version...

The other command line is not the command prompt, is it?


author: admin
body: Or Query tool into PostgreSQL Admin?


author: Nic Brough -Adaptavist-
body: You are right, it's not quite the same thing as a command line.

When I said command line, I'm thinking of the database command line. For postgres, you usually install the server along with "psql" as a client. It's not pretty, you just run your sql or service commands by typing things and get plain text output, but it does the basics in a minimal way.


author: admin
body: Ok ty very much. I think it is enough for now, I feel there is something not very well done by me in the db install process.

By the way is this normal, to have two DBs instead of one?

![Sin t?tulo.png](https://community.atlassian.com/t5/image/serverpage/image-id/5059i3C996AD521204AEF/image-size/large?v=v2&px=999 "Sin t?tulo.png")


author: Nic Brough -Adaptavist-
body: Yes, postgres stores a load of data about the databases it holds in a database. You can, and should, ignore the postgres database.


author: admin
body: It may be a problem with the user Confluence uses.

In [this guide, step 3](https://confluence.atlassian.com/doc/database-setup-for-postgresql-173244522.html#DatabaseSetupforPostgreSQL-Step3.SetupyourPostgreSQLdatabaseanduser), is it mandatory to set a password for that user? the guide doesn?t say so...


author: Nic Brough -Adaptavist-
body: Yes, you need a password, as you'll need Confluence to log into the database to use it!


author: admin
body: Ok understood, now this are the rest of the settings, are them ok for the user?

![user.png](https://community.atlassian.com/t5/image/serverpage/image-id/5116i14DD1FE8FDBA371F/image-dimensions/313x217?v=v2 "user.png")


author: Nic Brough -Adaptavist-
body: Looks right.


author: admin
body: Thinking out of the box... if I install a blanc or demo space instead a backup from cloud, and then I configure and create a user a usual, and then I go to restore from backup and I try to restore a my cloud backup in the server once installed, Will it work? os is it necesary to configure as confluence backup since the beggining?


author: Nic Brough -Adaptavist-
body: Yes, importing into a working confluence will be fine.