在Linux上,用openssl将加密后的口令写到口令文件中,调用时进行解密,当然你要保护这个口令文件的读取权限,以及 openssl 的调用权限.
示例如下:[eygle@enmoteam1 ~]$ echo "eygle" |openssl enc -base64
ZXlnbGUK
[eygle@enmoteam1 ~]$ echo "eygle" |openssl enc -base64 > encpasswd
[eygle@enmoteam1 ~]$ mypwd=`cat encpasswd|openssl enc -base64 -d`
[eygle@enmoteam1 ~]$ echo "$mypwd"
eygle
[eygle@enmoteam1 ~]$ rman target eygle/${mypwd}
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 18 10:01:17 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ENMOT1 (DBID=1258229964)
RMAN> exit
Recovery Manager complete.
这个办法比直接的明文,安全了一点点。