Forum Stats

  • 3,768,293 Users
  • 2,252,772 Discussions
  • 7,874,519 Comments

Discussions

Password changer in multiple database

Binoy
Binoy Member Posts: 14
edited Aug 28, 2013 1:07PM in General Database Discussions

Hi,

I am planning to have a functionality/procedure in the database that has the capability to change passwords on the database I am connected to and any other databases I have access to within the network. Is there a way for me to do this?

My current predicament is we are required to change the password in each environment we have IDs in every 60 days and this is quite laborious when I have access to 100+ instances.

TIA

Binoy

Tagged:

Answers

  • sb92075
    sb92075 Member Posts: 42,196 Blue Diamond
    edited Aug 28, 2013 10:04AM
    Binoy wrote:
    
    Hi,
    
    I am planning to have a functionality/procedure in the database that has the capability to change passwords on the database I am connected to and any other databases I have access to within the network. Is there a way for me to do this?
    
    My current predicament is we are required to change the password in each environment we have IDs in every 60 days and this is quite laborious when I have access to 100+ instances.
    
    TIA
    Binoy
    
    

    use central password repository like OID or what ever Oracle calls their product these days.

  • Mark D Powell
    Mark D Powell Member Posts: 5,914 Blue Diamond

    Bonoy, products like OID are extra cost.  If you need a free method I can offer two.  First just create a sqlplus script that sets the necessary Oracle environment then connects to each instance in turn issuing an alter user identified by command.  This is not very eloquent, but it works.  It is easy to write and not that difficult to maintain.

    - -

    A second approach is to write a pl/sql stored procedure that performs the password alteration and install it in every database.  Then you write a calling routine that performs a remote execution of the password routine.  Because you are executing these password routines via a database link and have so many remote instances to access you will need to explicitly close the links after use.

    - -

    HTH -- Mark D Powell --

  • SomeoneElse
    SomeoneElse Member Posts: 14,866 Silver Crown

    I use something simple like this for myself (at the sql plus command line) when I work at a shop with several instances.

    -- usage: passwordchanger username oldpassword newpassword

    connect &1/&[email protected]

    alter user &1 identified by &3 replace &2;

    connect &1/&[email protected]

    alter user &1 identified by &3 replace &2;

    connect &1/&[email protected]

    alter user &1 identified by &3 replace &2;

    connect &1/&[email protected]

    alter user &1 identified by &3 replace &2;

This discussion has been closed.