Coskan’s Approach to Oracle

April 23, 2007

Act as if, temporarily in Oracle

Filed under: Security — coskan @ 10:37 am

While discovering the internets new trend StumbleUpon after reading Eddie Awads last entry I found a nice site Red Database Security about Oracle Security. The whitepaper about passwords has useful paragraphs for Oracle DBAs.

Here is a sample paragraph about changing a users password temporarily without knowing the original passwords by using the undocumented feature called “by values” of alter user command. Suppose you want to login as user HR but you don’t know its password and you can’t change it all you have to do is backing up the hash key of password from dba_users table. Lets look how ;

From session 1; –backup the hash key and change the password

idle> connect / as sysdbaConnected.sys@XE> select username,password from dba_users where username=’HR’;

————- ——————————


sys@XE> alter user hr identified by passwd;

User altered.

From Session 2; try to logon with old password

idle> connect hr/hr
ERROR:ORA-01017: invalid username/password;logon denied

Warning: You are no longer connected to ORACLE.

From session 1; –login with temporary passsword do your job and change back it

idle> connect hr/passwd;>…..
–do you job
hr@XE>connect / as sysdba

sys@XE> alter user hr identified by values ‘4C6D73C3E8B0F0DA’;

User altered.

From Session 2; –vadaaaaaaa old password is still working

idle> connect hr/hr;


Because it is undocumented try this carefully !!!



  1. It’s a known feature since at least v5 of Oracle. The only thing that I would caution is if you are attempting to lock up the SYS and SYSTEM accounts so that no one can get in w/o having to set a new password.

    For example, alter user SYSTEM identified by values ‘Totally Secured’ will prevent anyone from hacking SYSTEM by any password guessing methods since the hashed value will never equal to ‘Totally Secured’. The only way then, is to reset the password if you need to use the SYSTEM account.

    The caution is obviously to ensure that you do have another account that is given privilege to reset other users’ passwords otherwise if you set SYS and SYSTEM as above and you don’t have another account with privilege to reset the password, you are locked out of your db although you still can get in via the OS level with “connect / as sysdba” which is deprecated in 10g.

    Comment by Peter K — April 23, 2007 @ 8:10 pm

  2. Thanks a lot for you comment Peter. I think the entry is really complete now

    Comment by coskan — April 23, 2007 @ 9:26 pm

  3. […] table, so to change the password temporarily, it is not possible to use the way I explained here […]

    Pingback by Alter user identified by values on 11G without using SYS.USER$ « Coskan’s Approach to Oracle — March 11, 2009 @ 11:14 am

  4. – eko (экологическое), строительство
    дома и ремонт.
    Эффективные экологические решения возведения

    Прогрессивное застраивание, предполагает снижение
    возведение домов с применением ЭКО чистейшых материалов.
    Ремонтно-строительных материалов, относительно неопасных для людей и природы, рожденных
    по новационным производственным спецтехнологиям.

    Недорогая стоимость для любого потребителя и многочисленное изготовление экологически безупречных материалов, придает вероятность создать новый эффективный энергосберегающий
    домик или реконструировать устаревшый.
    Механизмы энергосбережения настолько просты, что их может воплотить каждый
    желающий хозяин, а вместе
    с тем в будущем с экономить финансовые средства при отоплении в
    отопительный сезон. Экологические решения строительства – это дорога в новую эпоху.

    Comment by строительство — January 30, 2014 @ 8:33 pm

  5. Hello, Neat post. There’s an issue together with your site in internet
    explorer, might check this? IE still is the marketplace chief
    and a large portion of people will omit your wonderful writing because of this problem.

    Comment by catalogo zapatillas New Balance — May 12, 2014 @ 4:19 am

  6. Storm drains also come into that wetland, analytical chemistry harris cleaning the water from
    these rivers for drinking water purpose then definitely assimilative
    capacity will be varying. Cartridge filters are another type of an effluent outlet zone.

    Comment by analiza ścieków — June 18, 2014 @ 6:55 am


    Act as if, temporarily in Oracle | Coskan’s Approach to Oracle

    Trackback by — October 19, 2014 @ 1:31 pm

  8. What i don’t understood is in fact how you are now not really much more smartly-liked than you might be now.
    You’re very intelligent. You already know thus considerably relating to this
    matter, produced me personally believe it from a lot of numerous angles.
    Its like men and women aren’t involved unless it is something to do with Woman gaga!
    Your personal stuffs great. All the time care for it

    Comment by Sector 6 — March 25, 2015 @ 6:13 am

  9. We carry a variety of walk-in bathtubs that can suit the style of any bathroom and easily fit in the same space as your existing bathtub or shower. Our bathtubs are designed to be long-lasting and withstand daily wear and tear. Not only are they incredibly durable, but they are also low-maintenance. The non-porous material prevents the buildup of dirt and grime and even protects against mold and mildew. You can be sure you are bathing in a clean, healthy environment.
    Certain walk-in tub models offer a lot of features in a single tub. Rather than purchasing modifications such as over tub seats, add-on handrails, anti-scald valves, and non-slip flooring, a walk-in tub combines all of these features and more in one package. This can reduce the amount of construction needed in your bathroom for remodeling as well as reducing the time required to make the modifications.

    Comment by walktubs — November 15, 2018 @ 9:50 pm

  10. nice post

    Comment by northwoodasset — March 21, 2019 @ 1:33 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: