0

In my /etc/sudoers.d/myAppCommand file I set some command like this.

Cmnd_Alias APP_CMD = /opt/myApp/lib/app-start, \
                                    /opt/myApp/lib/app-stop, \
                                    /opt/myApp/lib/app-restart
#Rules section
#
my-app ALL = NOPASSWD: APP_CMD

But at the time of installation this command giving the below error:

2015-01-12 08:22:27 SecurityEvent sudo Rack1 alert sudo:  my-app : no tty present and no askpass program specified ; TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/opt/myApp/lib/app-start
joy87
  • 71
  • 2
  • 2
  • 3

1 Answers1

1

For some reason you have requiretty set in your sudoers file. Since it's disabled by default it was set either by your distro, administrator, or you.

See this answer for how to disable requiretty for a single command.

bahamat
  • 39,666
  • 4
  • 75
  • 104