[sudo-users] no tty present and no askpass program specified
Todd C. Miller
Todd.Miller at courtesan.com
Wed Nov 2 10:31:10 EDT 2011
>From the error message you are receiving, sudo is trying to read a
password but this is a non-interactive session. You may want to
use sudo's -n (non-interactive) option which will at least give you
a more useful error message.
The root of the problem is likely the sudoers entry for uyqn0001.
The way that whitespace is handled in sudoers commands has changed
so it is possible that you simply need to add some backslashes
to quote the spaces in the command. Perhaps something like:
uyqn0001 ALL = NOPASSWD: /bin/su - dspace -c cd\ /u/app/dspace/batch/feeds/monaco\ ;\ ./MonacoTradeInactiveDataCleanup.sh
That would allow uyqn0001 to run:
sudo /bin/su - dspace -c "cd /u/app/dspace/batch/feeds/monaco ; ./MonacoTradeInactiveDataCleanup.sh"
>From the log entry you posted you may need an extra (non-quoted)
space after the -c.
More information about the sudo-users