Purpose:
Here in the below blog, You will come to know about How to allow an OS user to login with "/" without sysdba access.
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=NEERPRD
[oraneeraj@neeraj.dba.com ~]$ sqlplus /
ERROR:
ORA-01017: invalid username/password; logon denied
User authentication is not allowed.
[oraneeraj@neeraj.dba.com ~]$ sqlplus / as sysdba
SQL>
here Its able to connect to database.
Now let's see how this can be achieved:
1. Need to have the parameter "os_authent_prefix " set to some value.
2. Create a user with <PREFIX><OSUSER> identified by externally.
3. Grant create session to user <PREFIX><OSUSER>.
[oraneeraj@neeraj.dba.com ~]$ sqlplus "/ as sysdba"
SQL> show parameter auth
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$
SQL> select username from dba_users where username like 'OPS$%';
USERNAME
------------------------------
OPS$ORACLE
1 rows selected.
SQL>
SQL> !id
uid=1002(oraneeraj) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1003(racoper),1004(asmdba)
SQL> create user ops$oraneeraj identified by externally;
User created.
SQL> grant create session to ops$oraneeraj ;
Grant succeeded.
SQL>
[oraneeraj@neeraj.dba.com ~]$ sqlplus /
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> show user
user is"OPS$ORANEERAJ"
SQL>
No comments:
Post a Comment