In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, a colleague received a task to change the passwords of database SYS and SYSTEM users. When assigning the task, the boss also brought a sentence to synchronize the password files, so he thought of a blog he wrote a few days ago about Oracle password files. At that time, he only wrote about how to create password files and how to log in to the database remotely using SYSDBA to do operations. However, there is no mention of whether the user's password in the password file is related to the user's password in the database.
Let's test it. The platform I use is 11.2.0.4.
First change the password of SYS
Sys@ORCL > alter user sys identified by zhaoxu;User altered.-- because the password in the 11g dba _ user view is null, select the user$ view sys@ORCL > select password from user$ where name='SYS' PASSWORD-C53B64BC84353309-- recommends that remote_login_passwordfile needs to be EXCLUSIVEsys@ORCL > show parameter remote_login_passwordfileNAME TYPE VALUE -remote_login_passwordfile string EXCLUSIVE
Create a password file and test remote login
# create a password file with the same password as the SYS user [oracle@rhel6 dbs] $cd $ORACLE_HOME/ dbs [oracle @ rhel6 dbs] $orapwd file=orapworcl entries=3 password=zhaoxu [oracle@rhel6 dbs] $ls-l orapworcl-rw-r- 1 oracle oinstall 1536 Dec 26 21:32 orapworcl# test connection succeeded [c:\ ~] $sqlplus sys/zhaoxu@192.168.56.2/orcl as sysdbaSQL*Plus: Release 12.1.0.1.0 Production on Monday December 26 21:34:22 2016Copyright (c) 1982 2013, Oracle. All rights reserved. Connect to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > select password from user$ where name='SYS' The hash value of the PASSWORD---C53B64BC84353309# password does not change # create a password file that is different from the SYS password [oracle@rhel6 dbs] $orapwd file=orapworcl entries=3 password=luoxi force=y [oracle@rhel6 dbs] $ls-l orapworcl-rw-r- 1 oracle oinstall 1536 Dec 26 21:36 orapworcl# test connection Login with the password of the original password file was not successful, and login was successful with the password of the new password file, but the password hash value of the SYS user has not changed [c:\ ~] $sqlplus sys/zhaoxu@192.168.56.2/orcl as sysdbaSQL*Plus: Release 12.1.0.1.0 Production on Monday December 26 21:36:20 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.ERROR:ORA-01017: invalid username/password; logon denied [c:\] $sqlplus sys/luoxi@192.168.56.2/orcl as sysdbaSQL*Plus: Release 12.1.0.1.0 Production on Monday 26 21:36:30 2016Copyright (c) 1982, 2013, Oracle. All rights reserved. Connect to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > select password from user$ where name='SYS';PASSWORD---C53B64BC84353309
Test to change the SYS user's password directly to see what will happen to the password file.
# the SYS password was modified successfully. The password hash value is different from the previous sys@ORCL > alter user sys identified by oracle;User altered.sys@ORCL > select password from user$ where name='SYS'. PASSWORD-8A8F025737A9097A# View password File The password file is also updated when changing the SYS password [oracle@rhel6 dbs] $ls-l orapworcl-rw-r- 1 oracle oinstall 1536 Dec 26 21:39 orapworcl# test remote login, you can no longer log in to the database using the luoxi password The modified SYS password can log in to the database [c:\] $sqlplus sys/luoxi@192.168.56.2/orcl as sysdbaSQL*Plus: Release 12.1.0.1.0 Production on Monday December 26 21:41:50 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.ERROR:ORA-01017: invalid username/password; logon denied [c:\] $sqlplus sys/oracle@192.168.56.2/orcl as sysdbaSQL*Plus: Release 12.1.0.1.0 Production on Monday 26 21:41:58 2016Copyright (c) 1982, 2013, Oracle. All rights reserved. Connect to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL >
To sum up: when changing the SYS password, the password in the password file will be changed at the same time to keep it consistent; if it is a manually created password file, the password in the password file can be the same as or different from the SYS password, which does not affect remote login. However, it is recommended that the full SYS password be the same as the password file, lest the password is wrong when you need to log in remotely, resulting in maintenance problems.
There are also related documents on MOS: Password or SYS Doesn't Match the Hash Value in USER$ (document ID 2139304.1)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.