i have been trying to execute a script with snmpget that has this code :
#!/bin/bash
sudo -S ufw disable
But when i use SNMPGET to execute this script , terminal asks password as an output :
NET-SNMP-EXTEND-MIB::nsExtendOutLine."script1".1 = STRING: [sudo] password for Debian-snmp:
So my question is that how can i fix the issue legally ?
You can send the sudo password, and any other input for your script, using
nsExtendInput.