当前位置:网站首页>What encryption algorithm is used for the master password of odoo database?
What encryption algorithm is used for the master password of odoo database?
2022-07-04 15:29:00 【weixin_ forty-three million four hundred and twenty-five thousa】
The default encryption algorithm is pbkdf2_sha512, The result obtained by adding salt iterations to the hash algorithm is used as the algorithm of password . Its basic principle is through a pseudo-random function ( for example HMAC function ), Take plaintext and a salt value as input parameters , Then repeat the operation , And finally generate the key . If the number of repetitions is large enough , The cost of cracking will become very high . The addition of salt value will also increase “ Rainbow watch ” The difficulty of the attack .
Let's look at a password structure obtained by this encryption algorithm :
$pbkdf2-sha512 25000 25000 25000ztkbw5jT.l8LwThHKKX03g$EFv2mH5uUh6VEZi4mmvzphsDnQdI1ufTw6JxppxXPfRIUj5JBK9N/kd.5NgiCCylwgiyUqCk0CiugHdYQQXNKA
The password goes through $ Symbols are separated into 4 part , The first part is the name of the calculation algorithm , The second is the number of iterations , The third part is the salt value , The fourth part is hash value .
Activate odoo A virtual environment , Run on the command line python, The plaintext password can be ’admin’ To encrypt , You can also ’admin’ Replace it with any plaintext password you want to use .
from passlib.context import CryptContext
print(CryptContext(['pbkdf2_sha512','plaintext'],deprecated=['plaintext'],).encrypt('admin'))
Available :
$pbkdf2-sha512$25000$ztkbw5jT.l8LwThHKKX03g$EFv2mH5uUh6VEZi4mmvzphsDnQdI1ufTw6JxppxXPfRIUj5JBK9N/kd.5NgiCCylwgiyUqCk0CiugHdYQQXNKA
Put it in odoo.conf in ,
admin_passwd=$pbkdf2-sha512$25000$ztkbw5jT.l8LwThHKKX03g$EFv2mH5uUh6VEZi4mmvzphsDnQdI1ufTw6JxppxXPfRIUj5JBK9N/kd.5NgiCCylwgiyUqCk0CiugHdYQQXNKA
One day I forgot the database master password , You can use the above method to generate a new encrypted password , take odoo.conf Medium admin_passwd Just replace it .
边栏推荐
猜你喜欢
Who the final say whether the product is good or not? Sonar puts forward performance indicators for analysis to help you easily judge product performance and performance
科研漫画 | 联系到被试后还需要做什么?
Luo Gu - some interesting questions 2
Dry goods | fMRI standard reporting guidelines are fresh, come and increase your knowledge
Preliminary exploration of flask: WSGI
一篇文章搞懂Go语言中的Context
Understand the context in go language in an article
Guitar Pro 8win10 latest guitar learning / score / creation
压力、焦虑还是抑郁? 正确诊断再治疗
AI做题水平已超过CS博士?
随机推荐
科普达人丨一文看懂阿里云的秘密武器“神龙架构”
Enter the width!
LeetCode 1184. 公交站间的距离 ---vector顺逆时针
重排数组
Redis哨兵模式实现一主二从三哨兵
JS tile data lookup leaf node
文本挖掘工具的介绍[通俗易懂]
.Net之延迟队列
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
从0到1建设智能灰度数据体系:以vivo游戏中心为例
flutter 报错 No MediaQuery widget ancestor found.
干货 | fMRI标准报告指南新鲜出炉啦,快来涨知识吧
Redis 解决事务冲突之乐观锁和悲观锁
找数字
Unity脚本API—Transform 变换
Intelligent customer service track: Netease Qiyu and Weier technology play different ways
对话龙智高级咨询顾问、Atlassian认证专家叶燕秀:Atlassian产品进入后Server时代,中国用户应当何去何从?
暑期复习,一定要避免踩这些坑!
小数,指数
PXE network