Automic Workload Automation

 View Only
  • 1.  How to get password from login object

    Posted Mar 08, 2021 05:12 PM
    Hi,

    How to get password from login object and pass it to sqlplus command thru unix job. I tried with GET_LOGIN script but it is failing, seems to be encrypted password. Please suggest,


  • 2.  RE: How to get password from login object

    Posted Mar 08, 2021 08:06 PM
    at the very bottom of the GET_LOGIN() instructions look closely at the example at the bottom.  The last statement looks like this;

    &UC_JOBMD CMD="......"

    It will execute the command that you specify within the quotes, and you are expected to include the encrypted password within the quotes.  At execution time it will display the encrypted password, but it runs with the decrypted password, so the password will never be exposed.


    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/GET_LOGIN.htm?TocPath=Reference%257CAutomation%2520Engine%2520Script%2520Reference%257CScript%2520Elements%2520Ordered%2520by%2520Purpose%257CObjects%257C_____9

    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 3.  RE: How to get password from login object

    Posted Mar 09, 2021 10:38 AM
    Hi @BhanuPrasad Hebbare

    GET_LOGIN only works if you've created an entry in UC_LOGIN_TYPES. Once created, the entry appears in the typ column of any Login object. Assign a user and a password. GET_LOGIN can than read user and password from this type of entry, but never from a "normal" agent. That would be a little bit to easy...

    Christoph 


    ------------------------------
    ----------------------------------------------------------------
    Automic AE Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 4.  RE: How to get password from login object

    Posted Dec 07, 2021 06:34 AM

    Hi All
    This is the very thread i have  been looking for.  But may i add another phase to the question. In what object can you run those commands. I have tried with a JOBS->WINDOWS object, where i have entered those commands in the Process tab and PreProcess tab,  but i get the error

    attribute 'LOGIN.DLW' is not allowed for object type 'JOBS/WINDOWS'.

    May I ask which Object(s) accepts those commands?



    ------------------------------
    [JobTitle]
    [State]
    ------------------------------



  • 5.  RE: How to get password from login object

    Posted Dec 07, 2021 06:42 AM
    Edited by Frank Muffke Dec 07, 2021 06:43 AM
    Hi

    pls find the ultimate answer from Christoph above...

    Yo need to define a new "login type" in the mentioned VARA and select exactly this newly created one in the login object holding your credentials...

    due to security reasons, OS types are not allowed...

    you can use this function (get_login_type) in all OS jobs with this trick.

    and in all other jobs without the trick which need a login object

    cheers, Wolfgang


    ------------------------------
    Support Info:
    if you are using one of the latest version of UC4 / AWA / One Automation please get in contact with Support to open a ticket.
    Otherwise update/upgrade your system and check if the problem still exists.
    ------------------------------



  • 6.  RE: How to get password from login object

    Posted Dec 07, 2021 07:33 AM
    Hi

    Thank you for that, we did all that. but i found the problem (or my mistake), The example given in the manual shows

         :SET &LOGIN# GET_ATT(LOGIN)
         :SET &LI# GET_LOGIN(&LOGIN#,SVN,SVN,LOGIN_INFO)
         :SET &PW# GET_LOGIN(&LOGIN#,SVN,SVN,PASSWORD)


    we verbatim entered the above into the process tab (with our  parameters), and was getting the error i previously showed.

    When we removed/commented out the line

         !:SET &LOGIN# GET_ATT(LOGIN)

    it works as expected.

    (Not sure why the GET_ATT line is there in this example)

    Thanks
    Del


    ------------------------------
    [JobTitle]
    [State]
    ------------------------------