It may never happen to you, but if you ever lose or forget the password for the administration user in Alfresco, it is possible to reset that password within the database.
While the reset process is easy to do, it involves fiddling directly with the database, something which you should be careful with, especially if that's not something you typically work with. If you're having problems with a production system, by all means, experiment first on a test system. You don't want to make a bad situation worse.
While the reset process is easy to do, it involves fiddling directly with the database, something which you should be careful with, especially if that's not something you typically work with. If you're having problems with a production system, by all means, experiment first on a test system. You don't want to make a bad situation worse.
First run the following SQL to find out the identifying parameters for how the admin password is stored:
SELECT anp1.node_id, anp1.qname_id, anp1.string_value as hash_pass, anp2.string_value as user_string FROM alf_node_properties anp1 INNER JOIN alf_qname aq1 ON aq1.id = anp1.qname_id INNER JOIN alf_node_properties anp2 ON anp2.node_id = anp1.node_id INNER JOIN alf_qname aq2 ON aq2.id = anp2.qname_id WHERE aq1.local_name = 'password' AND aq2.local_name = 'username';
After doing that, you'll see something like the following:
To update the password, the following SQL works:
UPDATE alf_node_properties SET string_value='209c6174da490caeb422f3fa5a7ae634' WHERE node_id=THEADMINNODEID and qname_id=THEADMINQNAME
Or, from the example shown in the screenshot above:
UPDATE alf_node_properties SET string_value='209c6174da490caeb422f3fa5a7ae634' WHERE node_id=4 and qname_id=10
Hi Dick,
ReplyDeleteThanks for this - your Alfresco postings are much appreciated.
Regards,
Eddie
Hello Dick,
ReplyDeleteHope you are doing good, thanks for the blog it is really interesting! Back in College I took a class titled Distributed Operative Systems, and we had to program a MD5 decrypter algorithm with my teacher, It will be useful for this case...
Alberto
hi Dick,
ReplyDeleteThanks for this information,
How can i find the user password in table..
The post describes how to change the current encrypted password to something else.
ReplyDelete