忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
_______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
opengauss=# opengauss=# alter user opengauss with password 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
不行啊
发件人: zhang_xb 发送时间: 2022-05-16 16:50 收件人: tommy; community 主题: [Community] 回复: 请问如何修改opengauss 用户的密码? 这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
_______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
如果忘记了某个用户的密码,需要使用超级用户,比如init user omm,在数据库本机上登陆进数据库,然后执行alter suer username identified by new_password; 超级用户修改其他用户密码,无需提供原始密码。
-- Kamus kamusis@gmail.com 在 2022年5月16日 +0900 17:53,tommy sz_cuitao@163.com,写道:
opengauss=# opengauss=# alter user opengauss with password 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
不行啊
发件人: zhang_xb 发送时间: 2022-05-16 16:50 收件人: tommy; community 主题: [Community] 回复: 请问如何修改opengauss 用户的密码? 这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
我是用yum方式安装的Opengauss,超级用户就是opengauss。
[root@opengauss1 ~]# [root@opengauss1 ~]# su - opengauss Last login: Tue May 17 11:05:36 CST 2022
Welcome to 5.10.0-60.27.0.57.oe2203.x86_64
System information as of time: Tue May 17 11:05:57 AM CST 2022
System load: 1.29 Processes: 133 Memory used: 9.7% Swap used: 0% Usage On: 14% IP address: 10.0.2.15 IP address: 192.168.56.121 Users online: 1 To run a command as administrator(user "root"),use "sudo <command>". [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ gsql gsql ((GaussDB Kernel V500R002C00 build ) compiled at 2022-03-30 05:12:20 commit 0 last mr ) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help.
opengauss=# opengauss=# \lu Invalid command \lu. Try ? for help. opengauss=# opengauss=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------------------------------------------------------------+----------- tommy | | {} opengauss | Sysadmin, Create role, Create DB, Replication, Administer audit, Monitoradmin, Operatoradmin, Policyadmin, UseFT | {}
opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
现在忘记了opengauss 初始密码,改不了opengauss的密码了。
发件人: LeYi Zhang 发送时间: 2022-05-17 10:56 收件人: zhang_xb; community; tommy 主题: [Community] Re:回复: 请问如何修改opengauss 用户的密码? 如果忘记了某个用户的密码,需要使用超级用户,比如init user omm,在数据库本机上登陆进数据库,然后执行alter suer username identified by new_password; 超级用户修改其他用户密码,无需提供原始密码。
-- Kamus kamusis@gmail.com 在 2022年5月16日 +0900 17:53,tommy sz_cuitao@163.com,写道:
opengauss=# opengauss=# alter user opengauss with password 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
不行啊
发件人: zhang_xb 发送时间: 2022-05-16 16:50 收件人: tommy; community 主题: [Community] 回复: 请问如何修改opengauss 用户的密码? 这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
_______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
我个人没有在openEuler 22.03中直接yum install opengauss,因此不确认以下回复在openEuler自带的openGauss上是否也适用。
根据openGauss企业版的特性,init user是不允许远程连接的,因此实际上无需对于init user进行密码修改,如果为了远程连接(远程连接需要提供密码),那么可以创建新的user。
-- Kamus kamusis@gmail.com 在 2022年5月17日 +0900 12:09,tommy sz_cuitao@163.com,写道:
我是用yum方式安装的Opengauss,超级用户就是opengauss。
[root@opengauss1 ~]# [root@opengauss1 ~]# su - opengauss Last login: Tue May 17 11:05:36 CST 2022
Welcome to 5.10.0-60.27.0.57.oe2203.x86_64
System information as of time: Tue May 17 11:05:57 AM CST 2022
System load: 1.29 Processes: 133 Memory used: 9.7% Swap used: 0% Usage On: 14% IP address: 10.0.2.15 IP address: 192.168.56.121 Users online: 1 To run a command as administrator(user "root"),use "sudo <command>". [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ gsql gsql ((GaussDB Kernel V500R002C00 build ) compiled at 2022-03-30 05:12:20 commit 0 last mr ) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help.
opengauss=# opengauss=# \lu Invalid command \lu. Try ? for help. opengauss=# opengauss=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------------------------------------------------------------+----------- tommy | | {} opengauss | Sysadmin, Create role, Create DB, Replication, Administer audit, Monitoradmin, Operatoradmin, Policyadmin, UseFT | {}
opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
现在忘记了opengauss 初始密码,改不了opengauss的密码了。
发件人: LeYi Zhang 发送时间: 2022-05-17 10:56 收件人: zhang_xb; community; tommy 主题: [Community] Re:回复: 请问如何修改opengauss 用户的密码? 如果忘记了某个用户的密码,需要使用超级用户,比如init user omm,在数据库本机上登陆进数据库,然后执行alter suer username identified by new_password; 超级用户修改其他用户密码,无需提供原始密码。
-- Kamus kamusis@gmail.com 在 2022年5月16日 +0900 17:53,tommy sz_cuitao@163.com,写道:
opengauss=# opengauss=# alter user opengauss with password 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
不行啊
发件人: zhang_xb 发送时间: 2022-05-16 16:50 收件人: tommy; community 主题: [Community] 回复: 请问如何修改opengauss 用户的密码? 这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
当前 yum 上使用的是 openGauss-server 社区 2.1.0 的分支出的包( https://gitee.com/opengauss/openGauss-server/tree/2.1.0 ),这个分支上初始用户修改自己的密码也需要旧密码,参考代码位置: https://gitee.com/opengauss/openGauss-server/blob/2.1.0/src/gausskernel/opti... 第 2737 行:
if (!(isRelSuperuser() || have_createrole_privilege()) || GetUserId() == roleid) { /* if rolepassword is seted in pg_authid, replPasswd must be checked. */ if (oldPasswd != NULL) { if (replPasswd == NULL) { str_reset(password); str_reset(replPasswd); str_reset(oldPasswd); ereport(ERROR, (errcode(ERRCODE_INVALID_PASSWORD), errmsg("The old password can not be NULL, please input your old password with 'replace' " "grammar.")));
这个问题在最新的代码中已经修复,初始用户修改自己的密码无需旧密码。 如 kamusis 所说,初始用户当前只允许在本机登录,而本机登录初始用户可以配置trust无需密码,暂时应该也不影响使用。
-----邮件原件----- 发件人: LeYi Zhang [mailto:kamusis@gmail.com] 发送时间: 2022年5月17日 13:35 收件人: zhang_xb 2578876417@qq.com; community community@opengauss.org; tommy sz_cuitao@163.com 主题: [Community] Re: Re:回复: 请问如何修改opengauss 用户的密码?
我个人没有在openEuler 22.03中直接yum install opengauss,因此不确认以下回复在openEuler自带的openGauss上是否也适用。
根据openGauss企业版的特性,init user是不允许远程连接的,因此实际上无需对于init user进行密码修改,如果为了远程连接(远程连接需要提供密码),那么可以创建新的user。
-- Kamus kamusis@gmail.com 在 2022年5月17日 +0900 12:09,tommy sz_cuitao@163.com,写道:
我是用yum方式安装的Opengauss,超级用户就是opengauss。
[root@opengauss1 ~]# [root@opengauss1 ~]# su - opengauss Last login: Tue May 17 11:05:36 CST 2022
Welcome to 5.10.0-60.27.0.57.oe2203.x86_64
System information as of time: Tue May 17 11:05:57 AM CST 2022
System load: 1.29 Processes: 133 Memory used: 9.7% Swap used: 0% Usage On: 14% IP address: 10.0.2.15 IP address: 192.168.56.121 Users online: 1 To run a command as administrator(user "root"),use "sudo <command>". [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ gsql gsql ((GaussDB Kernel V500R002C00 build ) compiled at 2022-03-30 05:12:20 commit 0 last mr ) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help.
opengauss=# opengauss=# \lu Invalid command \lu. Try ? for help. opengauss=# opengauss=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------------------------------------------------------------+----------- tommy | | {} opengauss | Sysadmin, Create role, Create DB, Replication, Administer audit, Monitoradmin, Operatoradmin, Policyadmin, UseFT | {}
opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
现在忘记了opengauss 初始密码,改不了opengauss的密码了。
发件人: LeYi Zhang 发送时间: 2022-05-17 10:56 收件人: zhang_xb; community; tommy 主题: [Community] Re:回复: 请问如何修改opengauss 用户的密码? 如果忘记了某个用户的密码,需要使用超级用户,比如init user omm,在数据库本机上登陆进数据库,然后执行alter suer username identified by new_password; 超级用户修改其他用户密码,无需提供原始密码。
-- Kamus kamusis@gmail.com 在 2022年5月16日 +0900 17:53,tommy sz_cuitao@163.com,写道:
opengauss=# opengauss=# alter user opengauss with password 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
不行啊
发件人: zhang_xb 发送时间: 2022-05-16 16:50 收件人: tommy; community 主题: [Community] 回复: 请问如何修改opengauss 用户的密码? 这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
_______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
好的,先这么用吧。 谢谢!
发件人: pengjiong 发送时间: 2022-05-17 14:16 收件人: LeYi Zhang; zhang_xb; community; tommy 主题: [Community] 答复: Re: Re:回复: 请问如何修改opengauss 用户的密码? 当前 yum 上使用的是 openGauss-server 社区 2.1.0 的分支出的包( https://gitee.com/opengauss/openGauss-server/tree/2.1.0 ),这个分支上初始用户修改自己的密码也需要旧密码,参考代码位置: https://gitee.com/opengauss/openGauss-server/blob/2.1.0/src/gausskernel/opti... 第 2737 行:
if (!(isRelSuperuser() || have_createrole_privilege()) || GetUserId() == roleid) { /* if rolepassword is seted in pg_authid, replPasswd must be checked. */ if (oldPasswd != NULL) { if (replPasswd == NULL) { str_reset(password); str_reset(replPasswd); str_reset(oldPasswd); ereport(ERROR, (errcode(ERRCODE_INVALID_PASSWORD), errmsg("The old password can not be NULL, please input your old password with 'replace' " "grammar.")));
这个问题在最新的代码中已经修复,初始用户修改自己的密码无需旧密码。 如 kamusis 所说,初始用户当前只允许在本机登录,而本机登录初始用户可以配置trust无需密码,暂时应该也不影响使用。
-----邮件原件----- 发件人: LeYi Zhang [mailto:kamusis@gmail.com] 发送时间: 2022年5月17日 13:35 收件人: zhang_xb 2578876417@qq.com; community community@opengauss.org; tommy sz_cuitao@163.com 主题: [Community] Re: Re:回复: 请问如何修改opengauss 用户的密码?
我个人没有在openEuler 22.03中直接yum install opengauss,因此不确认以下回复在openEuler自带的openGauss上是否也适用。
根据openGauss企业版的特性,init user是不允许远程连接的,因此实际上无需对于init user进行密码修改,如果为了远程连接(远程连接需要提供密码),那么可以创建新的user。
-- Kamus kamusis@gmail.com 在 2022年5月17日 +0900 12:09,tommy sz_cuitao@163.com,写道:
我是用yum方式安装的Opengauss,超级用户就是opengauss。
[root@opengauss1 ~]# [root@opengauss1 ~]# su - opengauss Last login: Tue May 17 11:05:36 CST 2022
Welcome to 5.10.0-60.27.0.57.oe2203.x86_64
System information as of time: Tue May 17 11:05:57 AM CST 2022
System load: 1.29 Processes: 133 Memory used: 9.7% Swap used: 0% Usage On: 14% IP address: 10.0.2.15 IP address: 192.168.56.121 Users online: 1 To run a command as administrator(user "root"),use "sudo <command>". [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ [opengauss@opengauss1 ~]$ gsql gsql ((GaussDB Kernel V500R002C00 build ) compiled at 2022-03-30 05:12:20 commit 0 last mr ) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help.
opengauss=# opengauss=# \lu Invalid command \lu. Try ? for help. opengauss=# opengauss=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------------------------------------------------------------+----------- tommy | | {} opengauss | Sysadmin, Create role, Create DB, Replication, Administer audit, Monitoradmin, Operatoradmin, Policyadmin, UseFT | {}
opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
现在忘记了opengauss 初始密码,改不了opengauss的密码了。
发件人: LeYi Zhang 发送时间: 2022-05-17 10:56 收件人: zhang_xb; community; tommy 主题: [Community] Re:回复: 请问如何修改opengauss 用户的密码? 如果忘记了某个用户的密码,需要使用超级用户,比如init user omm,在数据库本机上登陆进数据库,然后执行alter suer username identified by new_password; 超级用户修改其他用户密码,无需提供原始密码。
-- Kamus kamusis@gmail.com 在 2022年5月16日 +0900 17:53,tommy sz_cuitao@163.com,写道:
opengauss=# opengauss=# alter user opengauss with password 'Opengauss123'; ERROR: The old password can not be NULL, please input your old password with 'replace' grammar. opengauss=# opengauss=#
不行啊
发件人: zhang_xb 发送时间: 2022-05-16 16:50 收件人: tommy; community 主题: [Community] 回复: 请问如何修改opengauss 用户的密码? 这样试下,直接设置看看: alter user opengauss with password 'xxxx@123';
------------------ 原始邮件 ------------------ 发件人: "tommy" <sz_cuitao@163.com>; 发送时间: 2022年5月16日(星期一) 下午4:39 收件人: "community"<community@opengauss.org>;
主题: [Community] 请问如何修改opengauss 用户的密码?
忘记了原来的密码,现在如何修改呢?
opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE ''; ERROR: The old password is invalid. opengauss=# opengauss=# opengauss=# opengauss=# opengauss=# alter user opengauss identified by 'Opengauss123' REPLACE 'opengauss'; ERROR: The old password is invalid. opengauss=# opengauss=#
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
_______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org