Imperva device requires entering privilaged mode to run certain commands so we tried using the new command runner version with the --shell-config tag pointing to a YAML file.
The thing is that the YAML template seems to require a secondary password for this mode, when we tried to run it without the secondary password promote we got a command runner error.
Is it possible to enter privilaged mode without a secondary password? If so, what will be the right yaml and cli syntax?
This is the command used:
~command-runner full-command --ssh ‘indeni,Indenirocks123!,Indenirocks123!’ --shell-config /Users/michaelimas/Documents/Indeni/Scripts/get-cpu/imperva-securesphere-shell-configuration1.yaml --inject-tags ‘“ssh”=>“true” “vendor”=>“imperva” “os.name”=>“CentOS”’ --basic-authentication indeni,Indenirocks123! /Users/michaelimas/Documents/Indeni/Scripts/get-cpu/get_cpu_status.ind 10.11.80.21
This is the yaml file content:
_ ssh: “true”_
_ vendor: “imperva”_
_ os.name: “CentOS”_
_ command: “admin”_
_ prompt-regex: “.#"_
_ access-request-regex: “Password:”_
_ access-deny-regex: "% Bad password.”_
This is the privileged mode switch as done on the device (the command is admin, no need for password):
[Imperva] indeni@IMP-MX-01: admin
This is the error: