pg用户角色密码默认使用md5加密
2017-10-11 09:04
387 查看
postgres9.6@[local]:5432 postgres# create role r_test unencrypted password 'hello123' login;
CREATE ROLE
Time: 2.422 ms
postgres9.6@[local]:5432 postgres# select * from pg_shadow
;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
-------------+----------+-------------+----------+---------+--------------+-------------------------------------+----------+-----------
b | 16389 | f | f | f | f | md583aeaa4e529325e234e9c5c2e01e6c08 | NULL | NULL
test | 16385 | f | f | f | f | md505a671c66aefea124cc08b76ea6d30bb | NULL | NULL
a | 16388 | f | f | f | f | md5039af99d1e9a4b194e0eb800a6f8d018 | NULL | NULL
postgres9.6 | 10 | t | t | t | t | md5ad3e154e45b3eee89b51fdf2e60dafc6 | NULL | NULL
r_test | 32788 | f | f | f | f | hello123 | NULL | NULL
(5 rows)
Time: 0.767 ms
postgres9.6@[local]:5432 postgres# create role c login password 'cccccc';
CREATE ROLE
Time: 3.847 ms
postgres9.6@[local]:5432 postgres# select * from pg_shadow
;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
-------------+----------+-------------+----------+---------+--------------+-------------------------------------+----------+-----------
b | 16389 | f | f | f | f | md583aeaa4e529325e234e9c5c2e01e6c08 | NULL | NULL
test | 16385 | f | f | f | f | md505a671c66aefea124cc08b76ea6d30bb | NULL | NULL
a | 16388 | f | f | f | f | md5039af99d1e9a4b194e0eb800a6f8d018 | NULL | NULL
postgres9.6 | 10 | t | t | t | t | md5ad3e154e45b3eee89b51fdf2e60dafc6 | NULL | NULL
r_test | 32788 | f | f | f | f | hello123 | NULL | NULL
c | 32789 | f | f | f | f | md5e24b312f819219ec10b8b391a44d4974 | NULL | NULL
(6 rows)
Time: 0.824 ms
postgres9.6@[local]:5432 postgres# select md5('ccccccc'); -->括号中格式为“密码+用户名”
md5
----------------------------------
e24b312f819219ec10b8b391a44d4974
(1 row)
Time: 0.276 ms
CREATE ROLE
Time: 2.422 ms
postgres9.6@[local]:5432 postgres# select * from pg_shadow
;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
-------------+----------+-------------+----------+---------+--------------+-------------------------------------+----------+-----------
b | 16389 | f | f | f | f | md583aeaa4e529325e234e9c5c2e01e6c08 | NULL | NULL
test | 16385 | f | f | f | f | md505a671c66aefea124cc08b76ea6d30bb | NULL | NULL
a | 16388 | f | f | f | f | md5039af99d1e9a4b194e0eb800a6f8d018 | NULL | NULL
postgres9.6 | 10 | t | t | t | t | md5ad3e154e45b3eee89b51fdf2e60dafc6 | NULL | NULL
r_test | 32788 | f | f | f | f | hello123 | NULL | NULL
(5 rows)
Time: 0.767 ms
postgres9.6@[local]:5432 postgres# create role c login password 'cccccc';
CREATE ROLE
Time: 3.847 ms
postgres9.6@[local]:5432 postgres# select * from pg_shadow
;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
-------------+----------+-------------+----------+---------+--------------+-------------------------------------+----------+-----------
b | 16389 | f | f | f | f | md583aeaa4e529325e234e9c5c2e01e6c08 | NULL | NULL
test | 16385 | f | f | f | f | md505a671c66aefea124cc08b76ea6d30bb | NULL | NULL
a | 16388 | f | f | f | f | md5039af99d1e9a4b194e0eb800a6f8d018 | NULL | NULL
postgres9.6 | 10 | t | t | t | t | md5ad3e154e45b3eee89b51fdf2e60dafc6 | NULL | NULL
r_test | 32788 | f | f | f | f | hello123 | NULL | NULL
c | 32789 | f | f | f | f | md5e24b312f819219ec10b8b391a44d4974 | NULL | NULL
(6 rows)
Time: 0.824 ms
postgres9.6@[local]:5432 postgres# select md5('ccccccc'); -->括号中格式为“密码+用户名”
md5
----------------------------------
e24b312f819219ec10b8b391a44d4974
(1 row)
Time: 0.276 ms
相关文章推荐
- [转]Ubuntu默认使用root用户登录并免去输入密码
- Oracle使用默认用户登陆时,conn sys/密码 as sysdba,密码怎么是什么都行啊?
- C#对用户密码使用MD5加密与解密
- 基于C#对用户密码使用MD5加密与解密
- 视图dba_users_with_defpwd用于查看哪些用户还在使用默认密码
- ORACLE数据库查看使用默认密码的用户信息
- linux 将用户(PeersLee)加入[sudo]用户组(centos 6.5默认该组没有此用户)|| 免密码使用【sudo】
- 使用MD5加密用户密码
- oracle 11.2.0.4 查找还在使用默认密码的用户
- 使用MD5加密注册用户密码的简单示例
- 使用MD5加密注册用户密码的简单示例
- 使用MD5加密用户密码
- Linux 下的根用户安全管理策略及实践,第 2 部分: 权限安全使用和密码管理
- 在Windows Server 2008 R2中使用Web方式修改域用户账户密码
- 设定mysql默认用户密码
- 解决fedora的cscope默认使用了vi(同时设置emacs为用户默认编辑器)
- 取消共享文件默认使用的用户名和密码
- Oracle默认用户密码 视图操作
- [.Net MVC] 用户角色权限管理_使用CLK.AspNet.Identity
- 使用function 限制ORACLE用户密码长度