公司的网站建设与维护/百度收录快的发帖网站
wallet权限 linux 777 windows 需要修改.lck文件的owner
在ORACLE 10G前,我们在SHELL或JDBC中连接数据库时,都需要输入用户名与密码,并且都是明文。从1OGR2开始,ORACLE提供wallet这个工具,可以实现无需输入用户名与密码就可以登陆数据库,如下:
一般情况:sqlplus scott/oracle@htzdg
用wallet后:sqlplus /@htzdg
测试环境:
server :solaris 10,oracle 11gr2
client :win 7,oracle11gr2
登陆端配置tnsnames.ora文件,增加下面几行
- HTZDG =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.30)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVER = DEDICATED)
- (SERVICE_NAME = htzdg)
- )
- )
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
测试是否可以正常解析
- C:\Users\luoping>tnsping htzdg
- TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 29-8月 -
- 2012 21:40:40
- Copyright (c) 1997, 2010, Oracle. All rights reserved.
- 已使用的参数文件:
- D:\app\luoping\product\11.2.0\client_1\network\admin\sqlnet.ora
- 已使用 TNSNAMES 适配器来解析别名
- 尝试连接 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1
- 68.100.30)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = h
- tzdg)))
- OK (40 毫秒)
- C:\Users\luoping>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
下面是开始配置wallet
1,创建一个wallet
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore -wrl D:\app\luoping\product\11.2.0\client_1\pstore -create
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 输入口令:
- 再次输入口令:
- D:\app\luoping\product\11.2.0\client_1\BIN>cd ../
- D:\app\luoping\product\11.2.0\client_1>cd pstore
- D:\app\luoping\product\11.2.0\client_1\pstore>dir
- 驱动器 D 中的卷是 DATA
- 卷的序列号是 D60C-09BD
- D:\app\luoping\product\11.2.0\client_1\pstore 的目录
- 2012/08/29 15:39 <DIR> .
- 2012/08/29 15:39 <DIR> ..
- 2012/08/29 15:39 3,589 cwallet.sso
- 2012/08/29 15:39 3,512 ewallet.p12
- 2 个文件 7,101 字节
- 2 个目录 368,717,893,632 可用字节
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
2,启动wallet与指定wallet位置
- D:\app\luoping\product\11.2.0\client_1\network\admin>more sqlnet.ora
- # sqlnet.ora Network Configuration File: D:\app\luoping\product\11.2.0\client_1\
- network\admin\sqlnet.ora
- # Generated by Oracle configuration tools.
- # This file is actually generated by netca. But if customers choose to
- # install "Software Only", this file wont exist and without the native
- # authentication, they will not be able to connect to the database on NT.
- SQLNET.AUTHENTICATION_SERVICES= (NTS)
- NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
- WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=D:\app\luoping\product\11.2.0\client_1\pstore)))
- SQLNET.WALLET_OVERRIDE=TRUE
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
3,增加需要登陆的网络服务名,用户,密码到wallet中
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore -wrl D:\app\luoping\product\1
- 1.2.0\client_1\pstore -createCredential htzdg sys oracle
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 输入 Wallet 口令:
- Create credential oracle.security.client.connect_string1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
4,测试是否成功
- D:\app\luoping\product\11.2.0\client_1\BIN>sqlplus /@htzdg as sysdba
- SQL*Plus: Release 11.2.0.1.0 Production on 星期三 8月 29 17:48:27 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- 连接到:
- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
5,查看wallet中配置的网络服务名
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore -wrl d:\app\luoping\product\1
- 1.2.0\client_1\pstore -listCredential
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 输入 Wallet 口令:
- List credential (index: connect_string username)
- 1: htzdg sys
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
6,一个网络服务名,只能对应一个用户,如果相同的数据库有多少用户需要在同一个client通过wallet实现时,我们需要每一个用户,创建一个网络服务名。
下面是测试一个网络服务名,相增加两个用户时,报错。
- C:\Users\luoping>mkstore -wrl D:\app\luoping\product\11.2.0\client_1\pstore -cre
- ateCredential htzdg scott oracle
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 输入 Wallet 口令:
- Create credential 出现密钥存储错误: oracle.security.pki.OracleSecretStoreExcepti
- on: Credential already exists
7,当密码修改后,要手动更新wallet中相应的密码。不然要报错的。
- D:\app\luoping\product\11.2.0\client_1\BIN>sqlplus /@htzdg as sysdba
- SQL*Plus: Release 11.2.0.1.0 Production on 星期三 8月 29 17:45:56 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- 连接到:
- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL>
- SQL> alter user sys identified by htz;
- 用户已更改。
- SQL> exit
- 从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options 断
- 开
- D:\app\luoping\product\11.2.0\client_1\BIN>sqlplus /@htzdg as sysdba
- SQL*Plus: Release 11.2.0.1.0 Production on 星期三 8月 29 17:46:25 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- ERROR:
- ORA-01017: invalid username/password; logon denied
- 请输入用户名:
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore -wrl D:\app\luoping\product\1
- 1.2.0\client_1\pstore -modifyCredential htzdg sys
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 命令行中缺少您的密钥/口令
- 请输入您的密钥/口令:
- 请重新输入您的密钥/口令:
- 输入 Wallet 口令:
- Modify credential
- Modify 1
- D:\app\luoping\product\11.2.0\client_1\BIN>
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore -wrl D:\app\luoping\product\1
- 1.2.0\client_1\pstore -modifyCredential htzdg sys
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 命令行中缺少您的密钥/口令
- 请输入您的密钥/口令:
- 请重新输入您的密钥/口令:
- 输入 Wallet 口令:
- Modify credential
- Modify 1
- D:\app\luoping\product\11.2.0\client_1\BIN>
- D:\app\luoping\product\11.2.0\client_1\BIN>sqlplus /@htzdg as sysdba
- SQL*Plus: Release 11.2.0.1.0 Production on 星期三 8月 29 17:48:27 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- 连接到:
- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL>
8,手动删除wallet中的记录
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore -wrl d:\app\luoping\product\1
- 1.2.0\client_1\pstore -deleteCredential htzdg
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- 输入 Wallet 口令:
- Delete credential
- Delete 1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
9,mkstore命令帮忙手册
- D:\app\luoping\product\11.2.0\client_1\BIN>mkstore
- Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
- 版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
- mkstore [-wrl wrl] [-create] [-createSSO] [-createLSSO] [-createALO] [-delete] [
- -deleteSSO] [-list] [-createEntry alias secret] [-viewEntry alias] [-modifyEntry
- alias secret] [-deleteEntry alias] [-createCredential connect_string username p
- assword] [-listCredential] [-modifyCredential connect_string username password]
- [-deleteCredential connect_string] [-help] [-nologo]
----------------------------------权限相关 linux 777 windows 需要修改lck文件的owner
ORACLE wallet配置/管理/使用
推荐 原创
73436962012-09-12 21:40:19博主文章分类:ORACLE 基础©著作权
文章标签ORACLE WALLET文章分类数据库阅读数4803
昨天在公司配置数据库时,向wallet中增加了一个新的数据库,现实无需输入用户名与密码来登陆数据库,增加完成后,导致整个监控系统都是报用户名与密码的错误,无法登陆来数据库。但是ORACLE用户是能正常登陆数据库,不需要输入密码。其实原因很简单,因为我们的监控系统是nagios,而wallet相关的文件的默认权限是600,除ORACLE外其它的用户都是不可以读写的,正常情况下我们是改成了777的权限,让其它的用户也能使用钱包这个功能,当是我对wallet进行新增加一个数据库时,wallet会自己把cwallet.sso与ewallet.p12文件的权限自己改成600。这就导致了今天我的悲剧。
下面是wallet的配置/管理/维护/现象的模拟
1.创建wallet
- [oracle@test db_1]$ mkdir wallet
- [oracle@test db_1]$ pwd
- /u01/app/oracle/product/11.2.0/db_1
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -create
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- #这里输入wallet的密码,对密码是有限制条件的
- 1.密码长度要是8位以上。
- 2.密码最大长度没有限制。
- 3.密码要有字符与数据。
- Enter password:
- Enter password again:
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
2.配置wallet到sqlnet.ora中
- [oracle@test db_1]$ cat $ORACLE_HOME/network/admin/sqlnet.ora
- NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
- #DIRECTORY这里就是指定wallet所在的目录
- WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/u01/app/oracle/product/11.2.0/db_1/wallet)))
- SQLNET.WALLET_OVERRIDE=TRUE
- 1.
- 2.
- 3.
- 4.
- 5.
3.查看wallet的命令帮忙
wallet这个很好,因为直接用help就可以看到命令的帮忙了,不需要我们再去记复杂的参数,只用记住mkstore这个命令来管理wallet就可以了。
- [oracle@test db_1]$ mkstore -help
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- mkstore [-wrl wrl] [-create] [-createSSO] [-createLSSO] [-createALO] [-delete]
- [-deleteSSO] [-list] [-createEntry alias secret] [-viewEntry alias]
- [-modifyEntry alias secret] [-deleteEntry alias]
- [-createCredential connect_string username password] [-listCredential]
- [-modifyCredential connect_string username password] [-deleteCredential connect_string] [-help] [-nologo]
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
4.增加数据库到wallet中去,并测试是否成功
- 3.1#增加net service为htz scott为用户 oracle为用户的密码。
- #建议密码用''引起来,因为在生产环境中的密码基本上都是特殊字符的。
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -createCredential htz scott 'oracle'
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Create credential oracle.security.client.connect_string1
- 3.2 #查看是否增加成功。
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -listCredential
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- List credential (index: connect_string username)
- 1: htz scott
- 3.3 测试是否可以实现无需要输入用户与密码登陆
- [oracle@test db_1]$ sqlplus /@htz
- SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 8 09:19:15 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- #显示的是scott,成功了。
- SQL> show user;
- USER is "SCOTT"
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
5.查看entry
- #这里看到我们增加一个数据进来就会增加3个entries。
- #分别是一个连接符,一个用户名,一个密码。
- #当我们增加了很多数据库与用户进来后,数据库与用户还有密码他们是怎么关联的呢?其实他们就是通过后面的这个数字来关键的。
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -list
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Oracle Secret Store entries:
- oracle.security.client.connect_string1
- oracle.security.client.password1
- oracle.security.client.username1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
6.创建默认用户与密码
这样可以实现,登陆所以的数据库都可以使用默认的用户与密码
- 6.1 #创建默认的用户。
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -createEntry oracle.security.client.default_username scott
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- 6.2 #创建默认用户的密码。
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -createEntry oracle.security.client.default_password oracle
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- 6.3 #查看是否创建成功
- [oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -list
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Oracle Secret Store entries:
- oracle.security.client.connect_string1
- oracle.security.client.default_password
- oracle.security.client.default_username
- oracle.security.client.password1
- oracle.security.client.username1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
7.当默认用户与手动增加的数据库信息到wallet中时,那一个生效呢?
下面我们测试一下,当wallet里面创建了默认的用户与密码时,手动再增加一个增加的信息到wallet时,到底是默认用户还是手动增加的生效呢?其实是手动增加的生效。
- 7.1 #由于默认用户增加的SCOTT普通用户,所以这里我们增加sys这个用户来做测试,net service名是htzb
- [oracle@test db_1]$ mkstore -wrl $ORACLE_HOME/wallet -createCredential htzb sys 'oracle'
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Create credential oracle.security.client.connect_string1
- 7.2 #登陆测试。
- 这里没有增加as sysdba就是为了能区别普通用户与sys用户登陆的区别。如果是sys用户生效,就会报没有增加as sysdba登陆,如果是scott这个默认用户生效,就会登陆成功。
- [oracle@test db_1]$ sqlplus /@htzb
- SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 8 09:33:07 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- #这里报错,说明手动增加的SYS用户的生效。默认用户没有生效
- ERROR:
- ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
- Enter user-name:
- 7.3 #这里我们再登陆htz,登陆成功。说明我们默认用户在其它的net service是生效的。
- [oracle@test db_1]$ sqlplus /@htz
- SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 8 09:33:23 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- 7.4 #以sys as sysdba登陆成功
- [oracle@test db_1]$ sqlplus /@htzb as sysdba
- SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 8 09:33:30 2012
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> show user
- USER is "SYS"
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
8.下面测试的是通过mkstore修改wallet中的内容后,导致wallet相关的文件,权限自动改成600.
- 8.1 #把wallet的文件权限改成777
- [oracle@test db_1]$ chmod 777 $ORACLE_HOME/wallet/*
- [oracle@test db_1]$ ls -l $ORACLE_HOME/wallet
- total 16
- -rwxrwxrwx 1 oracle oinstall 4565 Sep 8 09:38 cwallet.sso
- -rwxrwxrwx 1 oracle oinstall 4488 Sep 8 09:38 ewallet.p12
- 8.2 #手动在wallet中增加一个net service的配置信息
- [oracle@test db_1]$ mkstore -wrl $ORACLE_HOME/wallet -deleteCredential htz
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Delete credential
- Delete 2
- 8.3 #再次查看权限时发现权限已经自己改成了600了
- [oracle@test db_1]$ ls -l $ORACLE_HOME/wallet
- total 16
- -rw------- 1 oracle oinstall 4205 Sep 8 09:39 cwallet.sso
- -rw------- 1 oracle oinstall 4128 Sep 8 09:39 ewallet.p12
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
9. 当用户的密码发生变化的时候需要修改wallet中的密码
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -modifyCredential htz scott 'oracleoracle';
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Modify credential
- Modify 1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
10.查看wallet中有那些认证的信息
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -listCredential
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- List credential (index: connect_string username)
- 1: htz scott
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
11 从wallet删除一个net service的配置信息
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -deleteCredential htz
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- Delete credential
- Delete 1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
12.修改默认的用户名
修改默认的用户名的密码的方法也一样。
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -viewEntry oracle.security.client.default_username
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- oracle.security.client.default_username = scott
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -modifyEntry oracle.security.client.default_username
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Your secret/Password is missing in the command line
- Enter your secret/Password:
- Re-enter your secret/Password:
- Enter wallet password:
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -viewEntry oracle.security.client.default_username
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- oracle.security.client.default_username = oracle
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
13 删除默认的用户名
登录后复制
- [oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -deleteEntry oracle.security.client.default_username
- Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- Enter wallet password:
- 1.
- 2.
- 3.
- 4.
- 5.
我们一般的维护就这么多。
--------linux 界面操作
--创建钱包,或者alter system set encryption key identified by "oracle";
orapki wallet change_pwd -wallet /home/sysrls/wallet/
#维护小脚本,应该用dos2unix转换或者在linux中手工编辑
#!/bin/bash
echo -e "Useful action\n"
echo -e "1)create wallet"
echo -e "2)create Credential"
echo -e "3)check the created Credential"
echo -e "4)modify the created Credential"
echo -e "5)delete the created Credential"
echo -e "6)list Credential item"
echo -e "7)list Credential Entry value "
echo -e "8)modify wallet password"
echo -e "9)exit"
read -p "choose your action:" num1
case $num1 in
1)
echo -e "Please enter wallet password:\n"
read -s password
printf "$password\n$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -create
echo -e "wallet create success\n"
;;
2)
echo -e "Please enter wallet password:"
read -s password
read -p "Please enter database tnsname:" tnsname
read -p "Please enter database user:" user
echo -n "Please enter database user's password:"
read -s dbpass
printf "$dbpass\n$dbpass\n$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -createCredential $tnsname $user
echo -e "Credential create success\n"
;;
3)
echo -e "Please enter wallet password:\n"
read -s password
printf "$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -listCredential
;;
4)
echo -e "Please enter wallet password:"
read -s password
read -p "Please enter database tnsname:" tnsname
read -p "Please enter database user:" user
echo -n "Please enter database user's password:"
read -s dbpass
printf "$dbpass\n$dbpass\n$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -modifyCredential $tnsname $user
echo -e "modify Credential success\n"
;;
5)
echo -e "Please enter wallet password:"
read -s password
read -p "Please enter database tnsname:" tnsname
printf "$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -deleteCredential $tnsname
echo -e "delete Credential success\n"
;;
6)
echo -e "Please enter wallet password:"
read -s password
printf "$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -list
;;
7)
echo -e "Please enter wallet password:"
read -s password
read -p "Please enter Entryname type:" type
if [ "$type" == "connect" ];then
printf "$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -viewEntry oracle.security.client.connect_string1
fi
if [ "$type" == "user" ];then
printf "$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -viewEntry oracle.security.client.username1
fi
if [ "$type" == "password" ];then
printf "$password\n" | /u01/app/oracle/product/11.2/db_1/bin/mkstore -wrl /u01/app/oracle/product/11.2/db_1/wallet/ -viewEntry oracle.security.client.password1
fi
;;
8)
/u01/app/oracle/product/11.2/db_1/bin/orapki wallet change_pwd -wallet /u01/app/oracle/product/11.2/db_1/wallet/
;;
9)
exit 0
esac
12.修改默认的用户名
修改默认的用户名的密码的方法也一样。
[oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -viewEntry oracle.security.client.default_username
--oracle.security.client.default_username = scott
mkstore -wrl $ORACLE_HOME/wallet -modifyEntry oracle.security.client.default_username
mkstore -wrl $ORACLE_HOME/wallet -viewEntry oracle.security.client.default_username
--oracle.security.client.default_username = oracle
13 删除默认的用户名
[oracle@test ~]$ mkstore -wrl $ORACLE_HOME/wallet -deleteEntry oracle.security.client.default_username
相关文章:

ORACLE wallet实现无需输入用户名与密码登陆数据库 注意修改目录权限
wallet权限 linux 777 windows 需要修改.lck文件的owner 在ORACLE 10G前,我们在SHELL或JDBC中连接数据库时,都需要输入用户名与密码,并且都是明文。从1OGR2开始,ORACLE提供wallet这个工具,可以实现无需输入用户名与密…...

linux - 用户权限
认知root用户 无论是Windows、Macos、Linux均采用多用户的管理模式进行权限管理 在Linux系统中,拥有最大权限的账户名为: root(超级管理员) root用户拥有最大的系统操作权限,而普通用户在许多地方的权限是受限的。普通用户的权限,一般在其HOME目录内是不…...

计蒜客T1115——字符串判等
水题不解释,考研复习压力偶尔写一道换换心情还不错~ 这里有一个比较有趣的知识点,对于同时输入多个字符串时还要允许空格的输入,那么普通的cin函数就不能满足要求了,这里采用getline函数解决,如下: string …...

Android Framework工具——EA画图
EA 是一个著名的企业架构(Enterprise Architecture)工具,用于绘制和管理企业的架构图和过程模型。该工具提供了多种功能,包括建立业务流程图、数据流图、组织结构图、应用架构图等。EA工具可帮助企业进行战略规划、业务流程改进和系统开发等活动。 一、时序图 时序图(Seq…...

使用MyEclipse如何部署Descriptor (XML)编辑器?
Descriptor (XML) Editor编辑器包含了高级的XML编辑功能,在本文中您将了解到这些编辑功能、Web XML编辑等,此功能包含在MyEclipse中可用。 MyEclipse v2023.1.2离线版下载 1. Web XML 编辑器 MyEclipse Web XML编辑器包括高级XML编辑功能,…...

Codeforces Round 889 (Div. 2)C题题解
文章目录 [Dual (Hard Version)](https://codeforces.com/contest/1855/problem/C2)问题建模问题分析1.按元素值分类讨论,正负不同时存在时2.若正负同时存在时代码 Dual (Hard Version) 问题建模 给定n个数,n不超过20,且每个数ai,…...

无涯教程-Perl - Subroutines(子例程)
定义子程序 Perl编程语言中 Subroutine子程序定义的一般形式如下: sub subroutine_name {body of the subroutine } 调用该Perl Subroutine的典型方式如下- subroutine_name( list of arguments ); 在Perl 5.0之前的版本中,调用 Subroutine的语法略有不同&…...

Rpc异步日志模块
Rpc异步日志模块作用 在一个大型分布式系统中,任何部署的分布式节点都可能发生崩溃,试想如果用普通的办法,即先排查哪个节点down掉了,找到down掉的节点后采取调试工具gdb调试该节点,进而排查宕机的原因。这中排查方法…...

python-pip
pip 路径 python 下载后自带pip ,在scripts 下,如 D:\install\python\Scripts numpy pip3 install numpy scipy matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simplepandas D:\install\python\Scripts>pip3 install pandas -i https://pypi.tuna.tsingh…...

无涯教程-Perl - getppid函数
描述 该函数返回父进程的进程ID。 语法 以下是此函数的简单语法- getppid返回值 该函数返回父进程的进程ID。 例 以下是显示其基本用法的示例代码- #!/usr/bin/perl$ppidgetppid();print "Parent Process ID $ppid\n";执行上述代码后,将产生以下输出- Paren…...

AUTOSAR规范与ECU软件开发(基础篇)1.2 汽车电子控制系统的基本构成
目录 前言 1、 传感器 2、 电子控制单元(ECU) 3、 执行器 前言 汽车电子控制系统主要由传感器(Sensor) 、 电子控制单元(Electronic Control Unit, ECU) 和执行器(Actuator) 组成(图1.1) ,对被控对象(Controlled Object)...

一个可以通过多个条件筛选的系统界面是如何实现的(springboot+mybatis)
比如我们有一个订单记录管理界面 条件可以通过订单号、商品名称、创建日期范围、价格范围。。。来进行筛选查询。 首先我们先确定数据库订单表(我这里就不做连表了,都放在一个表中)模拟一个订单表 order表 订单号商品名称创建日期价格地址…...

WebRTC | 实现数据流的一对一通信
目录 一、浏览器对WebRTC的支持 二、MediaStream与MediaStreamTrack 三、RTCPeerConnection 1. RTCPeerConnection与本地音视频数据绑定 2. 媒体协商SDP 3. ICE (1)Candidate信息 (2)WebRTC收集Candidate (3&…...

基于MATLAB小波变换的信号突变点检测
之前在不经意间也有接触过求突变点的问题。在我看来,与其说是求突变点,不如说是我们常常玩的"找不同"。给你两幅图像,让你找出两个图像中不同的地方,我认为这其实也是找突变点在生活中的应用之一吧。回到找突变点位置上…...

JUC并发编程(JUC核心类、TimeUnit类、原子操作类、CASAQS)附带相关面试题
目录 1.JUC并发编程的核心类 2.TimeUnit(时间单元) 3.原子操作类 4.CAS 、AQS机制 1.JUC并发编程的核心类 虽然java中的多线程有效的提升了程序的效率,但是也引发了一系列可能发生的问题,比如死锁,公平性、资源管理…...

个人用C#编写的壁纸管理器 - 开源研究系列文章
今天介绍一下笔者自己用C#开发的一个小工具软件:壁纸管理器。 开发这个小工具的初衷是因为Windows操作系统提供的功能个人不满意,而且现在闲着,所以就随意写了个代码。如果对读者有借鉴参考作用就更好了,能够直接代码段复用即可。…...

iTextSharp 生成PDF
示例代码定义了一个名为PdfController的API控制器,其中的GeneratePdf方法创建了一个新的PDF文档,并将内容添加到文档中。最后,将文档内容转换为字节数组,并通过File方法返回给前端。 注意,你需要在你的项目中添加对iT…...

基于微信小程序的传染病酒店隔离平台设计与实现(Java+spring boot+MySQL+微信小程序)
获取源码或者论文请私信博主 演示视频: 基于微信小程序的传染病酒店隔离平台设计与实现(Javaspring bootMySQL微信小程序) 使用技术: 前端:html css javascript jQuery ajax thymeleaf 微信小程序 后端:…...

vue3中用watch监听响应式数据的注意点
如果你在vue3中使用reactive()方法创建响应式数据,然后又用torefs()方法将响应式数据解构成单一的ref响应式数据。 此时,如果你想用watch监听解构出来单一的响应式数据,watch不起作用。 此时,你需要用watch监听之前的reactive()…...

Jmeter(五) - 从入门到精通 - 创建网络计划实战和创建高级Web测试计划(详解教程)
1.简介 上一篇中已经将其的理论知识介绍了一下,这一篇就带着大家一步一步的把上一篇介绍的理论知识实践一下,然后再说一下如何创建高级web测试计划。 2.网络计划实战 通过上一篇的学习,将其分类为: (1)不需…...

【单片机】51单片机,TLC2543,驱动程序,读取adc
TLC2543 是一款 12 位精密模数转换器 (ADC)。 1~9、11、12——AIN0~AIN10为模拟输入端; 15——CS 为片选端; 17——DIN 为串行数据输入端;(控制字输入端,用于选择转换及输出数据格式) 16——…...

誉天HCIE-Cloud_Computing3.0课程简介
课时:60 第一天 1. 华为云 Stack 解决方案及架构介绍 3. 华为云 Stack 的安装流程解析及规划设计 4. 华为云 Stack 的网络平面的规划解析 5. 华为云 Stack Deploy 部署工具的安装,配置,创建工程,下载 LLD 表 6. 华为云 Stack 的 …...

Unity之ShaderGraph 节点介绍 Procedural节点
程序化 噪声Gradient Noise(渐变或柏林噪声)Simple Noise(简单噪声)Voronoi(Voronoi 噪声) 形状Ellipse(椭圆形)Polygon(正多边形)Rectangle(矩形…...

期权定价模型系列【1】—BSM通用式模型
这是期权定价模型专栏的第一篇文章,此专栏旨在分享一些期权定价模型,将会从最基础的BSM模型开始写起,逐步扩散到蒙特卡洛模拟、二叉树等数值法模型,以及跳跃扩散模型、随机波动率模型,神经网络模型等等。 如果你觉得有…...

HA3 SQL样本实验:一种混合计算查询的全新样本解决方案
作者:陆唯一(芜霜) HA3(对外开源代号:Havenask )是阿里智能引擎团队自研的大规模分布式检索系统,广泛应用于阿里内部的搜索业务,是十多年来阿里在电商领域积累下来的核心竞争力产品。Ha3 SQL 是在原有Ha3引…...

Linux(Web与html)
域名 DNS与域名: 网络是基于tcp/ip协议进行通信和连接的 tcp/ip协议是五层协议:应用层–传输层—网络层----数据链路层----物理层每一台主机都有一个唯一的地址标识(固定的ip地址,用于区分用户和计算机。 ip地址:由…...

SpringBoot 底层机制分析[上]
文章目录 分析SpringBoot 底层机制【Tomcat 启动分析Spring 容器初始化Tomcat 如何关联Spring 容器】[上]搭建SpringBoot 底层机制开发环境Configuration Bean 会发生什么,并分析机制提出问题:SpringBoot 是怎么启动Tomcat ,并可以支持访问C…...

电源控制--对数与db分贝
在控制理论中,"db"通常表示分贝(decibel)的缩写。分贝是一种用于度量信号强度、增益或衰减的单位。 在控制系统中,分贝常用于描述信号的增益或衰减。通常,增益以正数的分贝值表示,而衰减以负数的…...

LeetCode 1749. 任意子数组和的绝对值的最大值(前缀和)
题目: 链接:LeetCode 1749. 任意子数组和的绝对值的最大值 难度:中等 给你一个整数数组 nums 。一个子数组 [numsl, numsl1, …, numsr-1, numsr] 的 和的绝对值 为 abs(numsl numsl1 … numsr-1 numsr) 。 请你找出 nums 中 和的绝对…...

python爬虫相关
目录 初识爬虫 爬虫分类 网络爬虫原理 爬虫基本工作流程 搜索引擎获取新网站的url robots.txt HTHP协议 Resquests模块 前言: 安装 普通请求 会话请求 response的常用方法 简单案例 aiohttp模块 使用前安装模块 具体案例 数据解析 re解析 bs4…...