If you work on multiple OpenACS systems and suffer from password overload, don't fret. This handy piece of SQL will reset your password to the same as it is on another system. In this example, I'm connected to the ACSTEST schema which I've forgotton the password for. I know my password for ACSDEV, so I'm copying it from there. My e-mail addresses are the same on both systems, so I just run the select then run the result. If your e-mail addresses are different you can always change the subquery.
select 'update users set password = '''||u.password||''', salt = '''||u.salt||''' where user_id = (select party_id from parties where party_id ='||p.party_id||');'
from
acsdev.users u,
acsdev.parties p
where u.user_id = p.party_id
and p.email = 'michael.hinds@quest.ie';
You can run the select on ACSDEV and paste into an ACSTEST SQL*Plus session, or in my case ACSTEST has access to ACSDEV anyway, hence the "acsdev." in front of the table names.
Monday, April 03, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment