copying user password
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: copying user password

  1. #1
    Join Date
    Sep 2000
    Location
    Calcutta / Ahmedabad, India
    Posts
    137

    copying user password

    Hi,

    we currently have a list of database users. we need to recreate the same user with a different username because of a different naming convention which we need to follow. How do i create the new user with the old password.

    Thanks
    Suvashish

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Code:
    SELECT password
    FROM dba_users
    WHERE user_name = 'xxx';
    
    ALTER USER yyy IDENTIFIED BY VALUES 'password_from above query';
    HTH
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Sep 2000
    Location
    Calcutta / Ahmedabad, India
    Posts
    137
    Hi,

    No it doesn't work that way'cos i had tried it out. Anyway the values in the password field in the dba_users is encrypted.

    what i mean is
    old user id: xyz
    old password : xyz1
    password in dba_users : 767B26Y8


    now if i give 767B26Y8 as the password of the new user then i need to log in using 767B26Y8, but i wish to login to the new user using the old password xyz1
    Suvashish

  4. #4
    Join Date
    Nov 2001
    Posts
    335
    Try with no quotes:

    ALTER USER yyy IDENTIFIED BY VALUES password_from above query ;
    One, who thinks that the other one who thinks that know and does not know, does not know either!

  5. #5
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Are you sure you gave the command exactly as above... it works...

    alter user username identified by values 'hashed password';

    dont forget the Quotes...
    Last edited by adewri; 04-11-2003 at 10:02 AM.
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  6. #6
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Originally posted by BV1963
    Try with no quotes:

    ALTER USER yyy IDENTIFIED BY VALUES password_from above query ;
    this wont work

    Code:
    SQL> alter user amar identified by values C5D5B636B43DB0C5;
    alter user amar identified by values C5D5B636B43DB0C5
                                         *
    ERROR at line 1:
    ORA-02153: invalid VALUES password string
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  7. #7
    Join Date
    Sep 2000
    Location
    Calcutta / Ahmedabad, India
    Posts
    137
    Hi ,

    This is the error i am getting.
    ----------------------------------------
    SVRMGR> alter user ram identified by '47AE452E8CEA0C04';
    alter user ram identified by '47AE452E8CEA0C04'
    *
    ORA-00988: missing or invalid password(s)
    Suvashish

  8. #8
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Originally posted by dsuva
    Hi ,

    This is the error i am getting.
    ----------------------------------------
    SVRMGR> alter user ram identified by '47AE452E8CEA0C04';
    alter user ram identified by '47AE452E8CEA0C04'
    *
    ORA-00988: missing or invalid password(s)
    Your missing the VALUES keyword.

    But I was wrong anyway this won't work as you intend to change the username.

    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  9. #9
    Join Date
    Nov 2001
    Posts
    335
    You are correct: quotes are needed. It works perfectly fine for me:

    1* ALTER USER TT IDENTIFIED BY VALUES 'DF305179EE5BCFED'
    urc01:RMAN> /

    User altered.
    One, who thinks that the other one who thinks that know and does not know, does not know either!

  10. #10
    Join Date
    Sep 2000
    Location
    Calcutta / Ahmedabad, India
    Posts
    137
    Hi,

    yes the user is getting altered . but when i am trying to connect to the user using the old password it is failing to connect.
    Suvashish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width