What you describe is pretty strange I dump postgresql db and reload it many
time and i didn't have this problem...

Try to look if there is not something wrong with your new installation...
May be you belive that you point to the right db, but you don't... It
possible that you point to SQLite... It happens sometime depending on how
you create your new app or if you try to make different app pointing on the
same DB that it says that auth tables already exist or try to overwrite
them...

Also you should have a look into your model and set your different table to
migrate=False to make sure web2py not try to update the db...

I do :

1) Web2py off
2) Load DB in postgres with pgAdminIII under a new name...
3) Edit your web2py app model with a generic text editor not the web2py
browser editor so you can modify your app when web2py is off (set your model
to migrate=false)
4) Make sure you point your app on the newly created : DB
db=DAL('postgres://USERNAME:PASSWORD@127.0.0.1:5432/NEWDBNAME')
5) Start dev server and it should works...

Richard

On Fri, Feb 18, 2011 at 5:32 AM, Matt <mattsn...@gmail.com> wrote:

> Thanks Richard.
>
> I had another look, and the database is in fact changing when I do a
> password reset.  The password after reset is sha512 + hmac using the
> salt specified in the db.py.  I checked it in code manually.   I tried
> to find a combination of algorithm that gave me the old hash, before
> the password reset but with no luck.  The salt in the db.py is exactly
> the same in both installs.  I think I may have to debug the old
> installation to verify the salt that is used.
>
> The problem is that I need to maintain the old passwords in the new
> install.
>
> On Feb 17, 3:51 pm, Richard Vézina <ml.richard.vez...@gmail.com>
> wrote:
> > Did you change the user of you DB?
> >
> > If yes, you have to change it in db.py in model this line (example for
> > Postgres) :
> >
> > db=DAL('postgres://USERNAME:PASSW...@127.0.0.1:5432/NEWDBNAME')
> >
> > And if it coming from the auth at login... Just put a password directly
> into
> > auth.user password field and go into your browser and use this password
> to
> > logon.
> >
> > It could append that you have enforce the strength or encryption you will
> > have to make your password conform to the rule of web2py strength
> > enforcement or change this line in db.py in model :
> >
> > custom_auth_table.password.requires = [IS_STRONG
> > <http://web2py.com/book/default/docstring/IS_STRONG>(), CRYPT
> > <http://web2py.com/book/default/docstring/CRYPT>()]
> >
> > *
> > *
> >
> > and remove : IS_STRONG(), CRYPT()
> > so it read :
> >
> > custom_auth_table.password.requires = []
> >
> > Richard
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Feb 17, 2011 at 6:01 AM, Matt <mattsn...@gmail.com> wrote:
> > > No actually it is the user authentication using Auth from the model.
> > > I think I will compare the database before and after, make sure I know
> > > exactly what has changed between the two.
> >
> > > Thanks.
> >
> > > On Feb 16, 7:21 pm, Richard Vézina <ml.richard.vez...@gmail.com>
> > > wrote:
> > > > The problem is it only when you try to access the appadmin on prod
> > > server?
> >
> > > > If so, it could come from parameters_443.py file in the web2py
> folder. It
> > > > contain the hash of you admin password.
> >
> > > > Richard
> >
> > > > On Wed, Feb 16, 2011 at 2:15 PM, Matt <mattsn...@gmail.com> wrote:
> > > > > I have recently moved my web2py installation to a new server.  The
> > > > > database (postgresql) was copied using an sql dump.  After this the
> > > > > user passwords appear to have stopped working.  If I do a password
> > > > > reset, and use the same password it works again.  The hash of the
> > > > > password is the same before and after the reset.  Any ideas what is
> > > > > going on?
> >
> > > > > Thanks
>

Reply via email to