【密码文件】Oracle 18c orapwd 命令 OPW-00029: Password complexity failed


18c创建密码文件报错:

OPW-00029: Password complexity failed for SYS user : Password must contain at least 8 characters.


解决:


orapwd file=orapwrac18cphy password=lhr format=12 force=y



当忘记sys口令的时候,可以使用orapwd命令重建口令文件。但是在Oracle 18c中却会报OPW-00029的错误。


[oracle@www.cndba.cn dbs]$ sqlplus -version
SQL*Plus: Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@www.cndba.cn dbs]$ orapwd file=/u01/app/oracle/product/18.3.0/db_1/dbs/orapwcndba password='oracle'  
OPW-00029: Password complexity failed for SYS user : Password must contain at least 8 characters.
[oracle@www.cndba.cn dbs]$

这是因为Oracle 增强了密码验证函数:ora12c_verify_function
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/dbseg/configuring-authentication.html#GUID-F09749BF-2881-4EE5-B59D-041E4796BAC4


The ora12c_verify_function function fulfills the Department of Defense Database Security Technical Implementation Guiderequirements.
This function checks for the following requirements when users create or modify passwords:
    The password contains no fewer than 8 characters and includes at least one numeric and one alphabetic character.
    The password is not the same as the user name or the user name reversed.
    The password is not the same as the database name.
    The password does not contain the word oracle (such as oracle123).
    The password differs from the previous password by at least 8 characters.
    The password contains at least 1 special character.
所以解决方法有两种:
1. 在指定符合验证函数的密码
[oracle@www.cndba.cn dbs]$ orapwd file=/u01/app/oracle/product/18.3.0/db_1/dbs/orapwcndba password='$www.cndba.cn$666'  
[oracle@www.cndba.cn dbs]$
2. 在orapwd命令中指定format到12.2 之前的版本。 该参数默认是12.2. 根据命令帮助,将format指定为12即可。
[oracle@www.cndba.cn dbs]$ orapwd -h
Usage 1: orapwd file=<fname> force={y|n} asm={y|n}
          dbuniquename=<dbname> format={12|12.2}
          delete={y|n} input_file=<input-fname>
          'sys={y | password | external(<sys-external-name>)
                | global(<sys-directory-DN>)}'
          'sysbackup={y | password | external(<sysbackup-external-name>)
                      | global(<sysbackup-directory-DN>)}'
          'sysdg={y | password | external(<sysdg-external-name>)
                  | global(<sysdg-directory-DN>)}'
          'syskm={y | password | external(<syskm-external-name>)
                  | global(<syskm-directory-DN>)}'
[oracle@www.cndba.cn dbs]$ orapwd file=/u01/app/oracle/product/18.3.0/db_1/dbs/orapwcndba password='oracle' format=12  
[oracle@www.cndba.cn dbs]$


When I tried to create a password file for a 12.2 database, it initially failed with my favorite (simple) password:

[oracle@uhesse dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwprima password=oracle
OPW-00029: Password complexity failed for SYS user : Password must contain at least 8 characters.

Two options to resolve this: Either provide a password that passes the complexity check, like:

[oracle@uhesse dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwprima password=Very_Complex§1

Or create the password file in 12.1 format (default being 12.2 format)

[oracle@uhesse dbs]$ orapwd describe file=orapwprimaPassword file Description : format=12.2 
[oracle@uhesse dbs]$ rm orapwprima[oracle@uhesse dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwprima password=oracle format=12
[oracle@uhesse dbs]$ orapwd describe file=orapwprimaPassword file Description : format=12

The only drawback of the 12.1 format seems to be the lack of support for granting administrative privileges to external users and enabling SSL and Kerberos authentication for administrative users, according to the  documentation . Which means for me I will keep my passwords simple 



About Me

........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub( http://blog.itpub.net/26736162 )、博客园( http://www.cnblogs.com/lhrbest )和个人weixin公众号( xiaomaimiaolhr )上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文博客园地址: http://www.cnblogs.com/lhrbest

● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群号: 230161599 (满) 、618766405

● weixin群:可加我weixin,我拉大家进群,非诚勿扰

● 联系我请加QQ好友 646634621 ,注明添加缘由

● 于 2018-11-01 06:00 ~ 2018-11-31 24:00 在魔都完成

● 最新修改时间:2018-11-01 06:00 ~ 2018-11-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

小麦苗的微店 https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麦苗出版的数据库类丛书 http://blog.itpub.net/26736162/viewspace-2142121/

小麦苗OCP、OCM、高可用网络班 http://blog.itpub.net/26736162/viewspace-2148098/

小麦苗腾讯课堂主页 https://lhr.ke.qq.com/

........................................................................................................................

使用 weixin客户端 扫描下面的二维码来关注小麦苗的weixin公众号( xiaomaimiaolhr )及QQ群(DBA宝典)、添加小麦苗weixin, 学习最实用的数据库技术。

........................................................................................................................

欢迎与我联系

 

 



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2215659/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26736162/viewspace-2215659/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值