英文:
Alfresco admin password lost - self hosted alfresco community edition
问题
Alfresco管理员密码丢失,它不属于LDAP服务器,即使我更新了在数据库中找到的admin用户的密码,也无法正常工作。
有人有任何解决办法吗?
谢谢
我尝试在数据库和alfresco-global.properties中更改密码,但都没有成功。
Alfresco版本是社区版(一个旧版本,4.2)。
英文:
Alfresco administrator password lost, it doesn't belong to the LDAP server, and even if i update the password of the admin user that i could find in the database, it doesn't not work correctly.
Anyone got any idea how to solve this?
Thank you
I tried changing the password in the database, in alfresco-global.properties, none works.
The alfresco version is the community edition (an old one, 4.2)
答案1
得分: 0
如果您在数据库中更改密码,在alfresco-global.users中更改密码,它会生效。
英文:
If you change the password in the database, in alfresco-global.users, it works.
答案2
得分: 0
在 Alfresco 3.x-5.0 中,内部用户的密码以 MD5 哈希形式存储在数据库中(在 Alfresco > 5.0 中,哈希算法是灵活的,并且表结构发生了变化)。
例如,要获取用户 admin
的密码哈希值:
SELECT anp1.node_id,
anp1.qname_id,
anp1.string_value
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'
AND anp2.string_value = 'admin';
+---------+----------+----------------------------------+
| node_id | qname_id | string_value |
+---------+----------+----------------------------------+
| 4 | 10 | 209c6174da490caeb422f3fa5a7ae634 |
+---------+----------+----------------------------------+
1 row in set (0.00 sec)
要将密码更新为 admin
,您可以设置哈希值为 209c6174da490caeb422f3fa5a7ae634
。根据前面查询返回的 ID,更新 SQL 可以如下所示:
update alf_node_properties
set string_value='209c6174da490caeb422f3fa5a7ae634'
where node_id=4 and qname_id=10;
您需要重新启动 Alfresco 以使更改生效。
在 alfresco-global.properties
中,无法更改现有 Alfresco 存储库的管理员密码。属性 alfresco_user_store.adminpassword
仅用于定义新存储库的管理员密码。如果您知道 Alfresco 中任何现有用户的密码,您可以暂时将该用户定义为管理员:
alfresco_user_store.adminusername=username
英文:
In Alfresco 3.x-5.0, the internal users passwords are stored as md5 hashes in the db (In Alfresco > 5.0 the hash algorithm is flexible and the table structre changed).
e.g. to get the password has for the user admin
:
SELECT anp1.node_id,
anp1.qname_id,
anp1.string_value
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'
AND anp2.string_value = 'admin'
+---------+----------+----------------------------------+
| node_id | qname_id | string_value |
+---------+----------+----------------------------------+
| 4 | 10 | 209c6174da490caeb422f3fa5a7ae634 |
+---------+----------+----------------------------------+
1 row in set (0.00 sec)
to update the passwort to the password admin
you could set the hash 209c6174da490caeb422f3fa5a7ae634
. Depending on the ids you got back from the previous query the update sql could look like:
update alf_node_properties
set string_value='209c6174da490caeb422f3fa5a7ae634'
where node_id=4 and qname_id=10;
You would need to restart Alfresco to take effect your change.
There is no way to change the admin password for an existing Alfresco Repository in alfresco-global.properties
. The property alfresco_user_store.adminpassword
is only to define the admin password for a new repository. If you know the password of any existing user in Alfresco you could define that user temporarily as the admin:
alfresco_user_store.adminusername=username
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论