都是逗号惹的祸 ORA-01017: invalid username/password; logon denied

在做SAP系统迁移的时间发现一个问题 ORA-01017: invalid username/password; logon denied

root@test:> brconnect -u // -c -f check
BR0801I BRCONNECT 7.40 (36)
BR0805I Start of BRCONNECT processing: cfedpzix.chk 2020-07-03 14:01:23
BR0484I BRCONNECT log file: /app/oracle/d4c/sapcheck/cfedpzix.chk
BR0280I BRCONNECT time stamp: 2020-07-03 14:01:25
BR0301E SQL error -1017 at location BrInitOraCreate-1, SQL statement:
'CONNECT BRT$ADM/*************** AT PROF_CONN IN SYSOPER MODE'
ORA-01017: invalid username/password; logon denied

BR0806I End of BRCONNECT processing: cfedpzix.chk 2020-07-03 14:01:25
BR0280I BRCONNECT time stamp: 2020-07-03 14:01:26
BR0804I BRCONNECT terminated with errors

忙了半天发现了一个很诡异的原因 Oracle账号的 oper 组丢了
root@test: $ id d4cadm
uid=50001(d4cadm) gid=601(sapsys) groups=602(dba)
root@test:$ id Oracle
uid=50002(Oracle) gid=602(dba)

找到元凶:
root@test)😒 cat /etc/group|grep -i oper
oper:!:603:,d4cadm,Oracle--at this line before d4cadm “,” should not there.

删除 “,”
root@test: $ cat /etc/group|grep -i oper
oper:!:603:d4cadm,Oracle

解决:
root@test: $ id d4cadm
uid=50001(d4cadm) gid=601(sapsys) groups=602(dba),603(oper)
root@test: $ id Oracle
uid=50002(Oracle) gid=602(dba) groups=603(oper)

root@ oracle 1> brconnect -u // -c -f check
BR0801I BRCONNECT 7.40 (36)
BR0805I Start of BRCONNECT processing: cfedsbde.chk 2020-07-04 00:07:18
BR0484I BRCONNECT log file: /app/oracle/d4c/sapcheck/cfedpzix.chk
BR0477I Oracle pfile /app/oracle/d4c/121/dbs/initd4c.ora created from spfile /app/oracle/d4c/121/dbs/spfiled4c.ora

BR0280I BRCONNECT time stamp: 2020-07-04 00:07:21
BR0813I Schema owners found in database d4c:

原理:
请参考 https://www.cnblogs.com/tingxin/p/13237553.html

posted on 2020-07-03 23:55  InnoLeo  阅读(599)  评论(0编辑  收藏  举报