0

sudo: no tty present and no askpass program specified error message is displayed while running shell script from Mac automator. Please let me know how to fix this ?

Shell Script is given below:

#!/bin/bash
for ((i=2;i<256;i++))
do
    sudo ifconfig lo0 alias 127.0.0.$i up
done

Error Message

sungtm
  • 547
  • 3
  • 12
poovaraj
  • 609
  • 1
  • 6
  • 10
  • Where are you executing this code? – sungtm Sep 16 '19 at 10:59
  • I have executed this code from Mac Automator – poovaraj Sep 16 '19 at 17:25
  • It seems duplicate in view of the already available [post](https://stackoverflow.com/questions/21659637/how-to-fix-sudo-no-tty-present-and-no-askpass-program-specified-error). Check the mentioned post. You'll find required answer. – sungtm Sep 17 '19 at 03:48

0 Answers0