15

We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?

npace
  • 4,218
  • 1
  • 25
  • 35
Adam Lerman
  • 3,369
  • 9
  • 42
  • 53

2 Answers2

27

Have you tried logging into Linux as your installed Oracle user then

sqlplus "/ as sysdba"

When you log in you'll be able to change your password.

alter user sys identified by <new password>;

Good luck :)

Paul Hargreaves
  • 1,757
  • 3
  • 23
  • 23
  • 3
    an addition... if you have root access but not the oracle user, login as root then "su - oracle" and follow Paul's instructions. Also try all the default oracle passwords. Last option is to look at OUTLN and DBSNMP accounts and Oracle hacks around that. – Mark Nold Sep 09 '08 at 16:29
  • It helped me, the default passwords in oracle 11g didn't work out. Does this mean that oracle can be compromised easily. – Xolve Apr 11 '09 at 14:09
2

You can connect to the database locally using the combination of environment variables:

  • ORACLE_HOME
  • ORACLE_SID .

Depending on your OS:

Unix/Linux:

export ORACLE_HOME=<oracle_home_directory_till_db_home>
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=<your_oracle_sid>
SQLPLUS / AS SYSDBA

Windows

set ORACLE_HOME=<oracle_home_path_till_db_home>
set PATH=%PATH%||%ORACLE_HOME%\bin
set ORACLE_SID=<your_oracle_sid>
SQLPLUS / AS SYSDBA

Once connected, you could then alter the user to modify the password:

ALTER USER username IDENTIFIED BY password;
Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
  • Depending on your server settings, you may also have to update your sqlnet.ora SQLNET.AUTHENTICATION_SERVICES= (NTS) in order to run SQLPLUS / AS SYSDBA – TrojanName Mar 06 '23 at 13:10