0

I inherited an Oracle DB on Linux Redhat from someone who left the company and didn't tell anyone what the passwords were to the various accounts on the database itself (not Linux), including what he had the oracle DB sys account set to.

However currently a production app is running on the server, so I don't want to delete the password file to reset it, as that would disrupt the production app.

I have complete (root) acess to the Linux server; the Linux server password is not the issue. I know I've done this once in the past, but I can't recall how I gained control, and Google is pointing to either deleting the file, or changing the password via another user, both of which aren't really option.

4
  • Are you asking about the user accounts to the database, or about the Linux system user accounts? It seems you might be asking about database user accounts, but it'd be better if it was explicit. (I really can't see the Oracle database engine storing passwords in a separate file, but you do say that you have access to the Linux server...)
    – user
    Commented Aug 21, 2014 at 19:02
  • Sorry for the lack of clarity, Michael Kjörling. I have complete (root) access to the server, just not of the oracle DB that's running on it.
    – Nex Terren
    Commented Aug 21, 2014 at 19:18
  • No worries! It isn't always easy to think of everything.
    – user
    Commented Aug 21, 2014 at 19:20
  • Thanks. I just did so. I didn't know that one existed.
    – Nex Terren
    Commented Aug 21, 2014 at 19:27

2 Answers 2

2

Well, if you have full access to the database host you don't need to delete and re-create the password file.

According to Using Operating System Authentication section in Database Administrator's Guide logging in as an OS user which is a member of dba group on *nix or ora_dba group on Windows and connecting to an Oracle Database instance using SQL*Plus with SYSDBA or SYSOPER privileges should do the trick.

$ ssh root@orcldbxe1
[root@orcldbxe1 ~]# su - oracle
[oracle@orcldbxe1 ~]$ groups
oinstall wheel dba
[oracle@orcldbxe1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Fri Aug 22 08:22:35 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL> select status from v$instance;

STATUS
------------
OPEN

SQL>

That's why it's called operating system authentication – you use operating system group. Simple and convenient, and no need to remember passwords. I always use it.

Once you're in, you can reset passwords and do other administrative tasks.

SQL> alter user spongebob identified by s3cr3t;
0

db-user passwords are in dba_users (10g) or sys.user$ (11g). No passwords have been given to you, but you need to login as the db-user (SCOTT).

eg. Oracle 11g

select password from sys.user$ where name='SCOTT'; -- save this EXISTIMG encrypted password. F123458D5B67

alter user scott identified by tiger; -- this is the new password that you just created.

conn scott/tiger -- do your stuff here. -- once done, reset the original password back again.

alter user scott identified by values 'F123458D5B67';

-- hopefully, Scott's profile allows him to reuse the same password or else you will have to change the LIMIT of the PASSWORD_REUSE_TIME in DBA_PROFILES.

Good Luck...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.