Change oracle password in linux

How to recover or change Oracle sysdba password [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

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?

2 Answers 2

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

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

alter user sys identified by ; 

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.

It helped me, the default passwords in oracle 11g didn’t work out. Does this mean that oracle can be compromised easily.

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

Depending on your OS:

export ORACLE_HOME= export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID= SQLPLUS / AS SYSDBA 
set ORACLE_HOME= set PATH=%PATH%||%ORACLE_HOME%\bin set ORACLE_SID= SQLPLUS / AS SYSDBA 

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

ALTER USER username IDENTIFIED BY password; 

Источник

Читайте также:  Email log files linux

Reset the Root Password in Oracle Linux

FYI, I did this tutorial in Oracle Enterprise Linux (OEL) 7, but this is a distro based on Red Hat Enterprise Linux (RHEL), so these instructions should more-or-less work on any similar distro to OEL/RHEL, give or take a few versions.
Let’s get started:

  1. Reboot Linux. When boot menu appears, press a key to stop it from booting any further. You should see something like this:
  2. Press the “ e ” key on the top line of the menu, and then on the next screen that appears, scroll down to the line that starts with “ linux16 ” and change the end from “… quiet LANG …” to “… quiet rw init=/bin/bash LANG …” so it’ll look like this: (Note: It’s fine if you don’t see the “ LANG …” part after “… quiet ” – just put the “ rw init=/bin/bash ” after “ quiet ” anyway.)
  3. At the prompt that appears, type “ passwd ” to change the root password:
  4. Now, depending on how your system is configured, you may also need to type “ touch /.autorelabel ” to have it perform a SELinux relabel of the disk to allow root login. Try it first without this, and if it doesn’t work, then try it with this (since it can take a while if you have a large disk).
  5. Type “ /usr/sbin/reboot –f ” to reboot.
  6. After waiting a few minutes for the reboot to finish, you should be able to log in as root with your new password!

Источник

Smart way of Technology

Worked in Database technology for fixed the issues faced in daily activities in Oracle, MS SQL Server, MySQL, MariaDB etc.

Change the SYS user password in Oracle

Change the SYS user password in Oracle

For change the lost password of user, you need the admin user of Operating system from which oracle install or you can change with ORAPWD command of Oracle.

Читайте также:  Format с в линукс

Change password with OS user

1. First login with the OS user in SQLPLUS.

For connect this you also have to modified the SQLNET.ORA file parameter has NONE to NTS value.

— modify the SQLNET file at @ORACLE_HOME/network/admin/ location
SQLNET.AUTHENTICATION_SERVICES= (NTS)

2. After login, take backup of SYS user password.
Note: Backup is best may it used in any tool or any script.

SQL> SELECT spare4 FROM sys.user$ WHERE name = ‘SYS’;
SPARE4
————————————————————————————————-
S:DD1775444147818D189125F1DCBF48C471A2BB7980D4B1F894877DE2E278;H:7176A46E7C925506B740F6568554A6A1

SQL> SELECT USERNAME,PASSWORD_VERSIONS FROM DBA_USERS WHERE USERNAME = ‘SYS’;

USERNAME PASSWORD_VER ---------- ------------ SYS 10G 11G

3. Change the password with ALTER command

ALTER USER SYS IDENTIFIED BY [password];

ALTER USER SYS IDENTIFIED BY PASS123;

Change password with ORAPWD

1. Backup the old password file in Windows : ORACLE_HOME\database or Linux: ORACLE_HOME\dbs

2. Run the ORAPWD command to make a new file with new password.

C:\Users\ORACLE>orapwd file=C:\Oracle\dbhomeXE\database\PWDXE.ora password=Pass_123 entries=3

3. Test the new password:

C:\Users\ORACLE>sqlplus sys/Pass_123 as sysdba

SQL*Plus: Release 18.0.0.0.0 — Production on Tue Jul 14 14:45:23 2020
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.

Last Successful login time: Tue Jul 14 2020 14:45:00 +05:30

Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 — Production
Version 18.4.0.0.0
SQL>

Источник

Change Your Own Password in an Oracle Database

This article describes how to change the password for your own user in an Oracle database.

ALTER USER Command

Log on to the database as yourself, using any tool that can send SQL statements to the database.

CONN my_user/MyPassword123@orcl

Once connected, issue to the following ALTER USER command, specifying the new password.

ALTER USER my_user IDENTIFIED BY MyNewPassword123;

You don’t need any additional privileges to change your own password. The same command can be used to change the password for another user, provided you have a privileged account.

Читайте также:  Linux router with web interface

If you want to use special characters, remember to enclose the password in double quotes.

ALTER USER my_user IDENTIFIED BY "MyNewPassword123#";

SQL*Plus and SQLcl

As well as using the ALTER USER command, you can use the PASSWORD command from the SQL*Plus and SQLcl utilities. You will be prompted for your current password and the new password.

SQL> password Changing password for MY_USER Old password: ******** New password: ******** Retype new password: ******** Password changed SQL>

SQL Developer

From SQL Developer, do the following.

  • Right-click on the connection.
  • Select the «Reset Password. » option from the popup menu.
  • In the subsequent dialog, enter the current password and the new password with confirmation.
  • Click the OK button.

TOAD

From TOAD, do the following.

  • From the top menu, select «Session > Change Password».
  • In the subsequent dialog, enter the current password and the new password with verification.
  • Click the OK button.

Proxy Users

Proxy users allow you to connect to another user with your own credentials. This way you never need to know the credentials of the schema you are connecting to.

You should not attempt to change your password when connected as a proxy. Instead you should connect as yourself, change your password, then reconnect as a proxy user with your new password.

As an example, let’s imagine there is a schema owner called SCHEMA_OWNER and my user called MY_USER in a database called ORCL . My proxy connection would look like this. When prompted I would connect using the password for MY_USER .

CONN my_user[schema_owner]@orcl

To change my password I might to do something like this.

-- Connect to my user. CONN my_user@orcl -- Change password. ALTER USER my_user IDENTIFIED BY MyNewPassword123; -- Make a proxy connection again. CONN my_user[schema_owner]@orcl

Hope this helps. Regards Tim.

Created: 2019-03-15 Updated: 2023-02-09

Источник

Оцените статью
Adblock
detector