Hi!
Please add the following config:
sudo-command-enabled=true sudo-command-pattern=^sudo$ sudo-password-option=option.mypassword sudo-prompt-pattern=^[sudo] password for .+\: .*Based on this answer.
I’ve tested this with the following job:
- defaultTab: nodes description: '' executionEnabled: true id: 06c06c14-3836-4d5c-871f-ed162ca5c0b6 loglevel: DEBUG name: HelloSUDOWorld nodeFilterEditable: false nodefilters: dispatch: excludePrecedence: true keepgoing: false rankOrder: ascending successOnEmptyNodeFilter: false threadcount: '1' filter: 'name: node00 ' nodesSelectedByDefault: true options: - name: mypassword secure: true storagePath: keys/sudopasswd valueExposed: true plugins: ExecutionLifecycle: {} scheduleEnabled: true sequence: commands: - exec: sudo cat /etc/shadow keepgoing: false strategy: node-first uuid: 06c06c14-3836-4d5c-871f-ed162ca5c0b6My SSH node entry if you need an example
<?xml version="1.0" encoding="UTF-8"?> <project> <node name="node00" description="Ubuntu" tags="" hostname="192.168.56.10" osArch="amd64" osFamily="unix" osName="Linux" osVersion="5.14.0-284.30.1.el9_2.x86_64" username="vagrant" /> </project>Hope it helps!
Hi,
Are to be added on project level ?
That’s correct. Greetings.
Hi,
It seems that you’re facing this. You probably need to change the sudo-prompt-pattern value depending on your target OS (probably using ^.*password.* according to this), this thread would help you. According to your target OS, use the right pattern in sudo-command-pattern and sudo-prompt-pattern which is well explained here.
Regards.
Hi,
Could you share your remote node entry and project configuration? the sudo-password-option parameter must override that default option name. Please double-check your remote node entry/project config.
Ok, some things to consider:
Regards.