Delphix Toolkits (dxToolkit and dxmToolkit)

 View Only
Expand all | Collapse all

Delphix environment user update

  • 1.  Delphix environment user update

    Posted 04-24-2023 12:51:00 AM

    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.

    D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_set_envpass -d ushdcdel1 -envname "Masking USHE151 SQL 2016 Target" -username USDELPHIXSVC -password XXXXXXXXXXXXXXX( wrong Password)

    How I validated:

    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



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------


  • 2.  RE: Delphix environment user update

    Posted 04-24-2023 01:13:00 AM
    Edited by Matt Watson 04-24-2023 01:13:54 AM

    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
    ------------------------------



  • 3.  RE: Delphix environment user update

    Posted 04-24-2023 09:28:00 AM

    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.
    ------------------------------



  • 4.  RE: Delphix environment user update

    Posted 04-24-2023 09:45:00 AM

    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.

    1. What version of dxtoolkit are your running?
    2. 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?
    3. Are you able to update the user with the same password in the Delphix GUI?


    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 5.  RE: Delphix environment user update

    Posted 04-25-2023 12:45:00 AM

    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.


    1. What version of dxtoolkit are your running? - I dont remember which version, I have download it last 6 months back.
    2. 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. 
    3. 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.
    ------------------------------



  • 6.  RE: Delphix environment user update

    Posted 04-25-2023 09:10:00 AM

    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
    ------------------------------



  • 7.  RE: Delphix environment user update

    Posted 04-25-2023 09:24:00 AM

    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.
    ------------------------------



  • 8.  RE: Delphix environment user update

    Posted 04-25-2023 09:43:00 AM

    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
    ------------------------------



  • 9.  RE: Delphix environment user update

    Posted 04-26-2023 03:49:00 AM

    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.
    ------------------------------



  • 10.  RE: Delphix environment user update
    Best Answer

    Posted 04-26-2023 10:52:00 AM

    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
    ------------------------------



  • 11.  RE: Delphix environment user update

    Posted 04-27-2023 01:19:00 AM

    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.
    ------------------------------



  • 12.  RE: Delphix environment user update

    Posted 05-03-2023 05:08:00 AM

     

    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.
    ------------------------------



  • 13.  RE: Delphix environment user update

    Posted 05-03-2023 11:17:00 AM

    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
    ------------------------------



  • 14.  RE: Delphix environment user update

    Posted 05-04-2023 12:54:00 AM

    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.
    ------------------------------



  • 15.  RE: Delphix environment user update

    Posted 05-30-2023 01:01:00 AM

    Hi Neal
    Did you get a chance to look at my ask?



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------



  • 16.  RE: Delphix environment user update

    Posted 05-30-2023 10:34:00 AM

    Hi Karteek,

    No, I did not look at your question. We can't really answer questions like this that are so generic in nature. You did not provide an exact error message.

    You might have to download a Delphix support bundle to your desktop and look at the debug logs yourself to understand why the password did not change.

    We can't help with such broad questions as "what is the right command to execute the environment password change for all environments in all delphix". Some environments might be using password vaults. Maybe there was a certain password requirement that was not met (password length, special characters, etc.)?

    Thanks,
    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 17.  RE: Delphix environment user update

    Posted 04-25-2023 02:03:00 AM

     ./dx_set_envpass -d ENGINE -envname APPNAME -username UNAME -password PASSWORD -debug

    Error. Provided credentials doesn't work for environment APP.
    There were problems with changing password.. No job defined.



    ------------------------------
    PANKAJ ASEGAONKAR
    Delphix masking analyst
    Infosys
    ------------------------------