Original Message:
Sent: 05-30-2023 01:00:55 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Neal
Did you get a chance to look at my ask?
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 05-04-2023 12:53:47 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Neal
The below command worked fine for one environment
dx_set_envpass -d ushxxxxxxv01 -envname "Masking USHDxxx49 SQL 2014 Target" -username US\USxxxxC -password "xxxxxxxxxx" -debug
But when I executed the below command for all environments in all delphix engine was failed.
dx_set_envpass -all -username US\USxxxxC -password xxxxxxxxxx -debug
I could not saved the error message, but I remember like " The environment "xxxxx" in engine "xxxx" did not updated the latest password.
So please suggest, what is the right command to execute the environment password change for all environments in all delphix engines.
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 05-03-2023 11:17:19 AM
From: Neal Stack
Subject: Delphix environment user update
Hi Karteek,
When you say "In real time,And its worked fine" and then "After that , when I given the below command its did not worked and all failed.", I don't understand the differences?
Do you mean one time you executed it interactively (real time) and after that when executed from a script it failed?
We can't really debug this type of thing especially if you are unable to share the error message and provide more details.
Thanks,
Neal
------------------------------
Neal Stack
Senior Principal Technical Support Engineer
Delphix
Original Message:
Sent: 05-03-2023 05:08:19 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Neal
I have executed the below command in real time for one environment
dx_set_envpass -d ushxxxxxxv01 -envname "Masking USHDxxx49 SQL 2014 Target" -username US\USxxxxC -password "xxxxxxxxxx" -debug
In real time,And its worked fine.
After that , when I given the below command its did not worked and all failed.
dx_set_envpass -all -username US\USxxxxC -password xxxxxxxxxx -debug
Please suggest why its failing for all engine environments? when I use the same username and password.
I was unable to share the error message here.
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 04-27-2023 01:18:46 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Neal
I have used the similar script from ChatGPT, but its not able to identify the old password to replace with new password.
Like
$pass = "dfdfsdvdsvdsv" this is parameter in my PowerShell script . but its not working.
I kept new password in one notepad and saved with newpassword.txt and running the below command.
Ex:
Get-ChildItem -Path "D:\Users\kartmuthyala\Downloads\Test\files" -Recurse -Filter "*.ps1" | ForEach-Object {
(Get-Content $_.FullName) | ForEach-Object {
$_ -replace 'oldpassword', (Get-Content "D:\Users\kartmuthyala\Downloads\Test\NewPassword.txt") -join " "
} | Set-Content $_.FullName
}
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 04-26-2023 10:52:25 AM
From: Neal Stack
Subject: Delphix environment user update
Hi Karteek,
Here is an example from Google's AI Bard:
$oldString = "old string"$newString = "new string"Get-ChildItem -Recurse -Include *.txt | ForEach-Object { # Get the contents of the file $contents = Get-Content $_ # Replace the old string with the new string $contents = $contents -replace $oldString, $newString # Write the new contents back to the file Set-Content $_ $contents}
Here is a breakdown of the commands:
Get-ChildItem
gets a list of files in the current directory and its subdirectories.-Recurse
specifies that the command should recurse into subdirectories.-Include *.txt
specifies that the command should only list files with the .txt extension.ForEach-Object
iterates over the list of files and executes the specified command for each file.$_
is a variable that contains the current file.Get-Content
gets the contents of the file.-replace
replaces a string with another string.Set-Content
writes the contents of a file.
------------------------------
Neal Stack
Senior Principal Technical Support Engineer
Delphix
Original Message:
Sent: 04-26-2023 03:49:24 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Thank you Neal
Its working for me now. But I will test it in real time once the new password will generate.
And one more query, there are 50 + hook script files (.ps1) is there any way to update/replace the same password in .ps1 files? in singe shot?
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 04-25-2023 09:42:33 AM
From: Neal Stack
Subject: Delphix environment user update
Hello,
Try putting quotes around the password. This worked for me:
C:\Users\delphix\Downloads\dxtoolkit2-v2.4.17.2-win64-installer\dxtoolkit2>.\dx_set_envpass -engine neal6017 -username frodo -envname nealwin2019.dcol2.delphix.com -password "E#854it_Rtgwtx>PIP9Q*)e34!XPdsK"
Waiting for all actions to complete. Parent action is ACTION-3550
Password change actions is completed with success for environment nealwin2019.dcol2.delphix.com.
------------------------------
Neal Stack
Senior Principal Technical Support Engineer
Delphix
Original Message:
Sent: 04-25-2023 09:23:32 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Neal
D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_set_envpass --version
2.4.14.1
It include all types of numeric , alpha numeric and special characters., usually the new password generated by out internal system for every 180 days. Its not in our control. Do you mean that if we remove the special characters does it works?.
Sample password :
E#854it_Rtgwtx>PIP9Q*)e34!XPdsK
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 04-25-2023 09:10:26 AM
From: Neal Stack
Subject: Delphix environment user update
Hi Karteek,
You should be able to check the version like this:
dx_set_envpass --version
2.4.17.2
Which special characters are you using? Can you give us an example of the password (replace alphanumeric characters but leave the special characters)?
------------------------------
Neal Stack
Senior Principal Technical Support Engineer
Delphix
Original Message:
Sent: 04-25-2023 12:45:27 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Neal
Thank you for your response, even after passing the right password( the one am using not a new one ) , its not showing any message.
D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_set_envpass -d ushxxxxxxv01 -envname "Masking USHDxxx49 SQL 2014 Target" -username US\USxxxxC -password xxxxxxxxxx -debug
D:\Users\kartmuthyala\Downloads\dxtoolkit2>
not sure whats wrong here. but log file shows like:
Error. Provided credentials doesn't work for environment Masking USHxxxx49 SQL 2014 Target.
There were problems with changing password.. No job defined.
And pls find the answers below for your queries.
- What version of dxtoolkit are your running? - I dont remember which version, I have download it last 6 months back.
- What operating system are you running dxtoolkit on? Are there any special characters in the password that are meaningful to the operating system that might need to be escaped? Microsoft Windows [Version 10.0.19044.2846] - yes some special characters are there.
- Are you able to update the user with the same password in the Delphix GUI? Yes am able to update the same.
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 04-24-2023 09:45:12 AM
From: Neal Stack
Subject: Delphix environment user update
Hello Karteek,
It will not update the environment user if you enter an invalid password. If I enter an invalid password I see:
% ./dx_set_envpass -engine neal6017 -username "QA-AD\delphix" -envname nealwin2019.dcol2.delphix.com -password Delphix123
Error. Provided credentials doesn't work for environment nealwin2019.dcol2.delphix.com.
There were problems with changing password.. No job defined.
If I enter a valid password, there is no JOB that runs but an ACTION that executes to update the user:
% ./dx_set_envpass -engine neal6017 -username "QA-AD\delphix" -envname nealwin2019.dcol2.delphix.com -password XXXXXXX
Waiting for all actions to complete. Parent action is ACTION-3533
Password change actions is completed with success for environment nealwin2019.dcol2.delphix.com.
- What version of dxtoolkit are your running?
- What operating system are you running dxtoolkit on? Are there any special characters in the password that are meaningful to the operating system that might need to be escaped?
- Are you able to update the user with the same password in the Delphix GUI?
------------------------------
Neal Stack
Senior Principal Technical Support Engineer
Delphix
Original Message:
Sent: 04-24-2023 09:27:50 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Matt
Thank you for your response , even am getting the same error .
Error. Provided credentials doesn't work for environment Masking USHDCXX49 SQL 2014 Target.
There were problems with changing password.. No job defined.
Could you please suggest any other solution to auto update the password?
Regards
Karteek Muthyala
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
Original Message:
Sent: 04-24-2023 01:12:52 AM
From: Matt Watson
Subject: Delphix environment user update
Hi Karteek.
I've tested this and it seems to work as expected when an incorrect password is provided:
Error. Provided credentials doesn't work for environment xxxxxx.
There were problems with changing password.. No job defined.
I would suggest running the command with the "-debug" flag so you can see each of the requests to the engine.
------------------------------
Matt Watson
Delphix
Original Message:
Sent: 04-24-2023 12:50:58 AM
From: Karteek Muthyala
Subject: Delphix environment user update
Hi Team
I need some help here, I am using the below dxtoolkit command to update the env password for one of the environment , but its not updating and not validating with new password.<o:p></o:p>
D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_set_envpass -d ushdcdel1 -envname "Masking USHE151 SQL 2016 Target" -username USDELPHIXSVC -password XXXXXXXXXXXXXXX( wrong Password)<o:p></o:p>
How I validated: <o:p></o:p>
After executing the above command with wrong password, I have refreshed the environment and it got succeeded but it did not failed. Then I realized when I give wrong password, the environment should fail right?.
Am I doing the right way of updating the new password? Please suggest<o:p></o:p>
------------------------------
Karteek Muthyala
Information Security Engineer
Wells Fargo Bank, N.A.
------------------------------