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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.