Home » RDBMS Server » Security » Password capture
Password capture [message #43403] Wed, 16 July 2003 00:57 Go to next message
Joseph
Messages: 30
Registered: June 2002
Member
Dear friends,
Just wanted to know is there a way to get the password of the schemas that i want to use in the export command. Cause we have created a script file where we are writing a batch file inside that we are passing the schema name from java as a parameter. I want to capture the password for the schema and i want to pass it to the script, please help me out.

Regards
Joe
Re: Password capture [message #43405 is a reply to message #43403] Wed, 16 July 2003 02:42 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
For export, I don't think that's necessary. You connect as SYSTEM and select the USER you want. Or, user_name.table_name for all tables you want to be exported.

Anyway, I don't think you can retrieve a password directly but if you really need to access the schema as its owner, here's what you could do:
1. Connect to the db as a DBA
2. Look up the hash value of the current password for user_x.
SELECT password FROM dba_users WHERE username='USER_X'
3. Reset the password so you have access. Let's say we want the password to be set to the username
ALTER USER USER_X IDENTIFIED BY USER_X;
4. Run the batch or whatever actions you might want to perform.
5. Reset the password of the user.
ALTER USER USER_X IDENTIFIED BY VALUES 'the_hash_value_returned_in_step_2';
HTH,
MHE
Re: Password capture [message #43409 is a reply to message #43405] Wed, 16 July 2003 06:44 Go to previous message
Vikas Gupta
Messages: 115
Registered: February 2002
Senior Member
Perfect answer.

Just remember to capture the hash value returned in step 2, and store it somewhere, else you wont be able to reset it.

Regards,

Vikas.
Previous Topic: Password of users
Next Topic: sqlplus sys/password
Goto Forum:
  


Current Time: Fri Mar 29 05:38:19 CDT 2024