Four Stars

[resolved] Context DB Password Value

Hello, 
How can I change the value of the password in the context of database connections? I need to change out TOS, only in the configuration file. 
There is a need for some hash value? Or simply write to the configuration file plaintext passwords? Currently in the configuration file is not stored plaintext passwords, so we need to find out how to easily change the configuration file.
Thank you
23 REPLIES
Moderator

Re: [resolved] Context DB Password Value

Hi,
You can use Implicit Context Load(or tContextLoad) to define password as a context parameter and put value into an external file or database.
When your job is exported and running external to Talend, you can change password value in specified file or table directly.
Or define it as a local context parameter, then you will be able to change it in the context file.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] Context DB Password Value

Thank you, 
but to me it would be sufficient if the password to be changed in context file. 
Problem is that when I create a context, then the password is not stored in the file as plain text, but it looks like some hash. 
Therefore it is sufficient to change the password in the configuration file that generated the TOS DI and then change the value of password value? I exported Context of DB connection using the "Export as context".
Thank you
Moderator

Re: [resolved] Context DB Password Value

Hi,
There is no password info in your context file? Did you check your context file when export your job as .zip file?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] Context DB Password Value

Hi, 
in my exported context file is password value, but it is not a value which I entered. Therefore, I am wondering if I can then change only in the open form. 
Line in the context file looks as follows:
    <contextParameter comment="" name="Etl_Password" prompt="Etl_Password?" promptNeeded="false" type="id_Password" value="nLOBLe5G7cO3f0QfJhGzUg=="/>

And my password value, which is in the exported file is not the same, I've entered.
Thanks
Moderator

Re: [resolved] Context DB Password Value

Hi,
Did you check Default. properties file under demo/.zip filename/context/? In addition, DB connection password has been encrypted since 5.5. You cannot change info in properties file directly but make it  in .bat file.
For example;
 java -Xms256M -Xmx1024M -cp ../lib/dom4j-1.6.1.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;job1_0_1.jar; test.job1_0_1.job1 --context=Default --context_param db_user=root --context_param db_password=1234 %*

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] Context DB Password Value

Thank you very much Sabrina!
Moderator

Re: [resolved] Context DB Password Value

Hi pantolik,
If this issue is fixed, may I ask you to mark this topic as resolved? You can click the "Set this topic as resolved" link which is right underneath your initial post? This way, other users will be informed that this thread has been resolved.
Many thanks

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Context DB Password Value

hi,
there is more simple way:
in the context parameters,
the login type is string,
the password type is "password-type": that means it is encrypted,
if you choose String type, when you export the jobs, the password value will be in clear.
Seven Stars

Re: [resolved] Context DB Password Value

Hi Xdshi,
I have used context for passwords,earlier it was working fine but i do not know what happens now if i keep the password column in string mode it is working.if i keep it in password mode it is not working.
the password i entered is correct.i did copy and paste between "password"
Appreciate for quick response.
Regards,
rekha
Moderator

Re: [resolved] Context DB Password Value

Hi,
if i keep it in password mode it is not working.

Could you please give us some screenshots of your problem?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: [resolved] Context DB Password Value

Hi please see the below screen shots
permission were their but still am getting that error.
i have  tried for tmysqlconnection using password mode.even that is not worked
One Star

Re: [resolved] Context DB Password Value

can you try to manually give the password in the password field and see if that works?
Seven Stars

Re: [resolved] Context DB Password Value

Hi sankalp
yes it is working,if i give it manually
regards,
rekha
One Star

Re: [resolved] Context DB Password Value

You will need to show your context to me. Can you please share that screenshot? I tried doing it (keeping password as datatype password) and it worked for me. 
Seven Stars

Re: [resolved] Context DB Password Value

In the past i have used. it got worked. but now it is not.i have  re installed talend(6.3 version) again am facing the same problem.
One Star

Re: [resolved] Context DB Password Value

Well something must have changed that is why this issue is coming. Can you please share screenshot of your context with me?
Seven Stars

Re: [resolved] Context DB Password Value

hi,
plz find the screen shot
One Star

Re: [resolved] Context DB Password Value

I do not any issues with your context here. I thing..You are using context.Password1 and context.Port1 -- I hope you intend to you didnt intend to use context.Password in place of Password1. 
Also Can you try to print on console  following variables 
context.Password1 (not context.Password)
context.HostName
context.Port1
context.UserName 
and confirm that details are correct?
Seven Stars

Re: [resolved] Context DB Password Value

no actually i am using correct one i have sent you he sample.am using correct spell
Thank you
regards,
rekha
Seven Stars

Re: [resolved] Context DB Password Value

hi i have printed the context every thing is correct.
Regards,
rekha
One Star

Re: [resolved] Context DB Password Value

 Can you try to print on console  following variables 
context.Password1 (not context.Password)
context.HostName
context.Port1
context.UserName 
and confirm that details are correct?
Seven Stars

Re: [resolved] Context DB Password Value

yes it is correct.i have checked twice.what ever i kept in context is correct
Regards,
rekha
One Star

Re: [resolved] Context DB Password Value

then there will be a need to look at your job.