当前位置:网站首页>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 .
边栏推荐
- web聊天室实现
- Huawei cloud database DDS products are deeply enabled
- Weibo and Huya advance into interest communities: different paths for peers
- 這幾年爆火的智能物聯網(AIoT),到底前景如何?
- MySQL学习笔记——数据类型(2)
- %S format character
- LeetCode 58. Length of the last word
- Common API day03 of unity script
- 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
- 对话龙智高级咨询顾问、Atlassian认证专家叶燕秀:Atlassian产品进入后Server时代,中国用户应当何去何从?
猜你喜欢

Luo Gu - some interesting questions

C1 certification learning notes 3 -- Web Foundation

华为云数据库DDS产品深度赋能

Redis 发布和订阅

Redis 發布和訂閱

Functional interface, method reference, list collection sorting gadget implemented by lambda

How did the beyond concert 31 years ago get super clean and repaired?

Helix Swarm中文包发布,Perforce进一步提升中国用户体验

AI has surpassed Dr. CS in question making?

Case sharing | integrated construction of data operation and maintenance in the financial industry
随机推荐
Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
LeetCode 58. 最后一个单词的长度
怎么判断外盘期货平台正规,资金安全?
hexadecimal
Helix Swarm中文包发布,Perforce进一步提升中国用户体验
Redis 解决事务冲突之乐观锁和悲观锁
数据湖治理:优势、挑战和入门
LeetCode 1184. Distance between bus stops -- vector clockwise and counterclockwise
Solve the error of JSON module in PHP compilation and installation under CentOS 6.3
Unity script API - time class
Hexadecimal form
web聊天室实现
Redis哨兵模式实现一主二从三哨兵
.Net 应用考虑x64生成
暑期复习,一定要避免踩这些坑!
Usage of database functions "recommended collection"
Redis 发布和订阅
On the implementation plan of MySQL explain
在芯片高度集成的今天,绝大多数都是CMOS器件
Redis publier et s'abonner