md5_password_warnings

控制 MD5 密码使用警告的 GUC

md5_password_warnings 是一个 配置参数,用于决定在通过 CREATE ROLEALTER ROLE 命令加密密码时,是否会发出关于 MD5 密码使用的警告。

md5_password_warningsPostgreSQL 18 中被添加。

默认值

md5_password_warnings 的默认值为:on

按 PostgreSQL 版本详细信息

md5_password_warnings (PostgreSQL 19)

设置 开启
单位  
类别 连接与认证 / 认证
简短描述 启用 MD5 密码的弃用警告。
扩展描述  
上下文 user
变量类型 bool
来源 默认
最小值  
最大值  
枚举值  
启动值 开启
重置值 开启
源文件  
源行  
需要重启 false

文档md5_password_warnings

md5_password_warnings (PostgreSQL 18)

设置 开启
单位  
类别 连接与认证 / 认证
简短描述 启用 MD5 密码的弃用警告。
扩展描述  
上下文 user
变量类型 bool
来源 默认
最小值  
最大值  
枚举值  
启动值 开启
重置值 开启
源文件  
源行  
需要重启 false

文档md5_password_warnings

变更历史

示例

md5_password_warnings 的基本用法示例

postgres=# SHOW password_encryption;
 password_encryption 
---------------------
 md5
(1 row)

postgres=# ALTER ROLE foo PASSWORD 'bar';
WARNING:  setting an MD5-encrypted password
DETAIL:  MD5 password support is deprecated and will be removed in a future release of PostgreSQL.
HINT:  Refer to the PostgreSQL documentation for details about migrating to another password type.
ALTER ROLE

postgres=# SET md5_password_warnings TO off;
SET

postgres=# ALTER ROLE foo PASSWORD 'baz';
ALTER ROLE

分类

认证, GUC 配置项

另请参阅

password_encryption

反馈

提交有关“md5_password_warnings”的任何评论、建议或更正请 在此处