Alfresco忘了管理员登录密码如何处理
官网找到的,Alfresco的加密方法为MD4,
Alfresco Version 3.1sp1
For an Alfresco 3.1sp1 system, use the following instructions:
1) Run the following commands and check you have only one row in the output:
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'
It should output the current md4 hashed password for the 'admin' user. An example output is:
+---------+----------+----------------------------------+ | node_id | qname_id | string_value | +---------+----------+----------------------------------+ | 4 | 10 | 209c6174da490caeb422f3fa5a7ae634 | +---------+----------+----------------------------------+ 1 row in set (0.00 sec)
2) If you get only one row, then update the table:
UPDATE alf_node_properties SET string_value='209c6174da490caeb422f3fa5a7ae634'WHERE node_id=THENODEIDABOVEandqname_id=THEQNAMEVALUEABOVE
Where you need to replace THENODEIDABOVE and THEQNAMEVALUEABOVE with the results from step 1), in this example 4 and 10 respectively.
Note: Please use caution when running this SQL, and ensure that you have the appropriate AND conditions in the UPDATE query.
Alfresco Version 1.4
For Alfresco 1.4, use the following instructions:
UPDATE alf_node_properties SET string_value = '<MD4 hash here>' WHERE qname = '{http://www.alfresco.org/model/user/1.0}password' AND node_id in (SELECT node_id FROM alf_node_properties WHERE qname = '{http://www.alfresco.org/model/user/1.0}username' AND string_value = 'admin' );
- Note the MD4 hash for password 'admin' is
209c6174da490caeb422f3fa5a7ae634
- Note the MD4 hash for password 'test' is
0cb6948805f797bf2a82807973b89537
Alfresco Version 1.3
For Alfresco version 1.3, use the following instructions:
You can use this to get the hash for current admin password:
select string_value from alf_node_properties p, alf_namespace ns, alf_qname qwhere p.qname_id = q.idand q.ns_id = ns.id and ns.uri = 'http://www.alfresco.org/model/user/1.0' and q.local_name = 'password' AND node_id in ( SELECT node_id FROM alf_node_properties p, alf_namespace ns, alf_qname q WHERE p.qname_id = q.id and q.ns_id = ns.id and ns.uri = 'http://www.alfresco.org/model/user/1.0' and q.local_name = 'username' AND string_value = 'admin' );
And, you can use this to set the password:
UPDATE alf_node_properties p SET string_value = '<MD4 hash here>' WHERE p.qname_id = (select q.id from alf_qname q, alf_namespace ns where q.ns_id = ns.id and ns.uri = 'http://www.alfresco.org/model/user/1.0' and q.local_name = 'password') AND node_id in (SELECT node_id FROM alf_node_properties p, alf_namespace ns, alf_qname q WHERE p.qname_id = q.id and q.ns_id = ns.id and ns.uri = 'http://www.alfresco.org/model/user/1.0' and q.local_name = 'username' AND string_value = 'admin' );
Alfresco versions lower than 1.3
For Alfresco versions lower than 1.3, set the password in the database using the MD4 hash. For example:
UPDATE node_properties SET string_value = '<MD4 hash here>' WHERE qname = '{http://www.alfresco.org/model/user/1.0}password' AND guid = (SELECT guid FROM node_properties WHERE qname = '{http://www.alfresco.org/model/user/1.0}username' AND string_value = 'admin' );
How to generate the correct MD4 hash
The following class will allow the generation of the correct MD4 hash.
You will need the following jars:
- cryptix-jce-provider.jar
- commons-codec-1.2.jar
public class MD4HashGenerator { static { try { MessageDigest.getInstance("MD4"); } catch (NoSuchAlgorithmException e) { Security.addProvider(new CryptixCrypto()); } } public MD4HashGenerator() { super(); } /** * @param args */ public static void main(String[] args) { System.out.println("Hash: " + new String(Hex.encodeHex(md4(args[0])))); } private static byte[] md4(String input) { try { MessageDigest digester = MessageDigest.getInstance("MD4"); return digester.digest(input.getBytes("UnicodeLittleUnmarked")); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e.getMessage(), e); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e.getMessage(), e); } } }
"admin"对应的MD4值为“209c6174da490caeb422f3fa5a7ae634”
转载于:https://my.oschina.net/u/574158/blog/1925160
Alfresco忘了管理员登录密码如何处理相关推荐
- BCrypt管理员登录密码验证
一.简单入门测试 BCrypt不支持反运算,只支持密码校验 package com.william.test;import org.springframework.security.crypto.bc ...
- 设置计算机id管理员默认密码是多少钱,路由器默认(初始)管理员登录密码是多少?...
摘 要 路由器默认管理员登录密码是多少?路由器初始登录密码是多少? 或许大家在登录路由器时,会遇到这样的问题.针对这些疑问,下面小编总结了有关路由器默认(初始)登录密码的相关知识,希望对大家有所帮助. ...
- Mac电脑管理员登录密码破解方法
Mac电脑管理员登录密码破解方法: 1.关机 2.安装command+R或只按option建(按住不要放哟) 3.按下开机键-开机(第二步骤按住的建还是不要放哟) 4.等待开机读条完成 5.读完条按键 ...
- 怎么修改sqlserver用户密码_新版tplink路由器怎么修改管理员登录密码【修改方法】...
tplink路由器的管理员密码,通常又叫做登录密码;进入设置页面的时候,必须要输入的一个密码. 重要说明: 本文介绍的修改管理员密码的方法,是建立在你知道原来的"管理员密码",目前 ...
- 若依如何修改超级管理员登录密码?
1.如果是自己知道超级管理员的密码且需要修改的情况. 默认口令 admin/admin123,可以登录后在首页个人中心修改密码. 2.如果自己忘记了超级管理员的密码可以重新生成秘钥替换数据库密码. p ...
- 华为S2300系列交换机忘了console登录密码怎么办?
实际工作中,很多老交换机因时间久了没用,或者很少登录,所以忘了登录密码是常事. 这不,我这里刚好有一台2013年生产的华为Quidway S2326TP-SI,昨天我拿来测试,从console口登录, ...
- 忘记虚拟机主机管理员登录密码
以WMware虚拟机中WindowServer2008R2忘记开机密码为例. 1)配置虚拟主机的CD-ROM 启动VMware虚拟机程序 → 选中WindowServer2008R2虚拟主机 → 编辑 ...
- php后台管理员登录密码错误,如果后台管理员的密码错误,我该怎么办,还有两种找回密码的方法...
Dedecms是中国著名的网站管理核心. 由于编织梦想简单易用,因此可以进行二次开发,并且可以实现各种网站. 在使用dedecms的过程中,如果忘记了梦想管理后台的密码怎么办?神山个人博客分享了两种修 ...
- 计算机创建管理员用户名和密码,如何给电脑设置管理员登录密码?
关于个人电脑的管理,无论是办公室单位的个人电脑或者家里个人使用的电脑,很多人都不是很喜欢别人随便的打开自己电脑随意的查看东西或者有一些东西不希望别人查看!那么这个时候我们就需要采取一些方法来防止别人随 ...
最新文章
- Preview is unavailable until a successful build
- ES6标准学习: 4、数组的扩展
- python的迭代器无法输出值_python迭代器和生成器
- Centos7 安装 nginx 服务器的两种方式
- centos8下重启网卡命令_centos8 网络配置
- 【今晚七点半】:白板与开源
- web开发——Flask框架
- 【Kafka】kafka命令kafka-console-consumer.sh
- 写一个函数将传入的字符串转换成驼峰表示法
- base定义了所有链接的URL
- DNT 3.1 快速安装手记
- 价值连城 Apple研究院总监 Ruslan Salakhutdinov的采访 给AI 深度学习从业者的建议
- eclipse 导入maven项目_一文轻松学会:从GitHub下载项目到eclispe
- Java Graphics2D 在图片上画(微信昵称)含有特殊符号(Emoji)的文字
- Android 矢量图动画(完结篇)
- C语言代码绘制,利用数组输出 0-2Π之间的 sin 函数图像和 cos 函数图像,实验报告及代码。
- nuxt坑:This relative module was not found:* ./film.vue?vuetype=styleindex=0id=a3b0cd06lang=scss
- Metasploit扫描3389
- 频繁发送socket命令返回:[WinError 10054] 远程主机强迫关闭了一个现有的连接
- OSPF——基本概念2(多区域与Vlink)
热门文章
- 卡存好,还是存折存好?银行小妹给你讲讲
- gta5线上显示无法连接服务器,gta5线上模式连接不上怎么回事_gta5线上模式进不去如何解决...
- 华为云mysql怎么玩_初次尝试华为云
- 不用着急换新电脑了,「Macbooster」让您的旧Mac一样快如闪电~☛完美破解版☜
- PID专家控制matlab仿真
- exp-00056:遇到oracle错误 12154,EXP-00056 遇到 ORACLE 错误 12154 ORA-12154 TNS 无法解析指定...
- 【luogu P6178】【模板】Matrix-Tree 定理(行列式)(数学)(树)
- 微信小程序app.js中的全局变量globalData改变,如何通知其它页面界面显示改变,小程序中如何在其他页面中监听到globalData中值的变化
- linux下 mount IMG文件提示“您必须指定文件系统类型”
- bat文件修改CMD窗口标题