CPM Plugin 'setLastPromptToParameter' command

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CPM Plugin 'setLastPromptToParameter' command

L1 Bithead

Hi everyone,

 

Has anyone used the setLastPromptToParameter command in a custom CPM plugin?

 

I'm currently building a plugin that needs to capture the output of one command and use it as input for another, as part of a password change workflow. Here's the flow I'm trying to implement:

 

  1. After a successful login, I run the following command to generate a password hash: request password-hash username <username> password <pmpass> templatename <template>. This command outputs the hash to the terminal.
  2. I then enter configuration mode with: configure
  3. Finally, I need to run this command, passing in the previously generated hash: set template <template> config mgt-config users <username> phash <created-passphash>

 

I found documentation that mentions setLastPromptToParameter, which seems like it could capture the hash and store it for later use. However, there are no examples provided.

 

Has anyone successfully used this command in a plugin and could share an example or some guidance?

 

I’ve been stuck on this for a few days and would really appreciate any help!

 

Thanks in advance!

1 accepted solution

Accepted Solutions

L7 Applicator

There's an example of usage in the Cisco Router cpm plugin

​https://community.cyberark.com/marketplace/s/#a3550000000EiAUAA0-a3950000000jjSpAAI

 

 

View solution in original post

2 REPLIES 2

L7 Applicator

There's an example of usage in the Cisco Router cpm plugin

​https://community.cyberark.com/marketplace/s/#a3550000000EiAUAA0-a3950000000jjSpAAI

 

 

L1 Bithead

Yes, I am using that plugin as a reference.

 

Thank you!

  • 1 accepted solution
  • 165 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!