Jump to content

Admin password being reset after DB Synch


FrancisChung
 Share

Recommended Posts

Hi there,

I'm developing locally on my laptop and we have a testing server where I deploy via rsynch + running a DB Dump script.

(Exported via MySQLWorkbench)

I've noticed that the admin password becomes invalid every time a DB Dump script is run on the server.

Is this possibly because there's a hash and/or salt stored alongside the password and my local one is not valid on the server?

Are there better practices of synching between my local Processwire and the server instance to prevent the admin password being invalidated?

Link to comment
Share on other sites

  • 7 months later...

I have the same issue after DB syncing, i got it that salt in the config is the issue but as said several times its known that passwords will not work anymore after site migration. As far as i can say its not about the salt because nobody changes the salt for the migration. It wouldnt even be that bad if the user account data wouldnt be in the page table which of course has to be deployed if i add changes to the page. I deploy sometimes 10 times a day at least to staging areas and i am tired of reseting the passwords again and again. Isnt there any way to disable this? If a user changes his password by himself i will never be able to deploy without knowing his password?

Link to comment
Share on other sites

If the user salt is correctly deployed and your fields_pass table is also correctly moved there should be no problems. The only issue I can imagine is that one of your environments might support blowfish encryption and the other one doesn't, which would result in different hashing behaviors.

A few words about your rant about users being part of the pages table: If you have just about any amount of user-generated / user-changeable content you cannot overwrite the db just with a sql dump. You'll need to go different ways if you need to deploy (possibly automatically) your database changes with a staging/live environment. Therefore it shouldn't matter that much if users are pages as well or not.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...