markdown 密码哈希

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 密码哈希相关的知识,希望对你有一定的参考价值。

### Odoo 8.0:
Change the password directly in the Postgres Database, as it is saved in plain text:
```
~$  sudo su postgres
~$  psql
postgres=# \connect Your_Database_Name
You are now connected to database "Your_database_Name" as user "postgres"
YOurDatabase_Name=# update res_users set password='YourNewPassword' where id='1';
```
### Odoo 9.0 and Odoo 10.0:
Create a hash and then change the hash in the Postgres database:
```
~$ python
>>> from passlib.context import CryptContext
>>> print CryptContext(['pbkdf2_sha512']).encrypt('YourNewPassword')
```
Copy the Hash created
Ctrl Q
```
~$  sudo su postgres
~$  psql
postgres=# \connect Your_Database_Name
You are now connected to database "Your_database_Name" as user "postgres"
YOurDatabase_Name=# UPDATE res_users SET password='', password_crypt='YourCopiedHash' WHERE id=1;
```

### Odoo 11 and newer:
Create a hash using Python 3 and change the hash in the Postgres database:
```
~$ python3
>>> from passlib.context import CryptContext
>>> setpw = CryptContext(schemes=['pbkdf2_sha512'])
>>> setpw.encrypt('YourNewPassword')
```
Copy the Hash created
Ctrl Q
```
~$  sudo su postgres
~$  psql
postgres=# \connect Your_Database_Name
You are now connected to database "Your_database_Name" as user "postgres"
YOurDatabase_Name=# UPDATE res_users SET password='', password_crypt='YourCopiedHash' WHERE id=1;
```

以上是关于markdown 密码哈希的主要内容,如果未能解决你的问题,请参考以下文章

markdown Flash哈希

markdown [php:hash]在PHP上生成哈希。 #php #security

windows密码哈希的sam原理

密码哈希身份框架和盐

Django-检查两个密码哈希是否具有相同的原始密码

如何创建一个 laravel 哈希密码