Getting: sudo: no tty present and no askpass program specifi

Discussion of the Co:Z Co-Processing Toolkit for z/OS
Post Reply
jamiedirigo
Posts: 1
Joined: Fri Apr 15, 2011 4:18 pm

Getting: sudo: no tty present and no askpass program specifi

Post by jamiedirigo » Fri Apr 15, 2011 4:30 pm

I'm on 1.8 and when I run the following:
//STEP1 EXEC PROC=COZPROC,
// ARGS='-LI jamie@xyzzy'
//STDIN DD *
set -x
sudo ls -l
/*
//COZCFG DD *
ssh-options=-oStrictHostKeyChecking=no
server-env-PASSWD_DSN=//COZ.V180.SAMPJCL(JAMIE)
server-env-SSH_ASKPASS=/usr/local/coz/bin/read_passwd_dsn.sh
server-env-DISPLAY=none
/*

I get:
+ sudo ls -l
sudo: no tty present and no askpass program specified

dovetail
Site Admin
Posts: 1948
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail » Mon Apr 18, 2011 7:54 am

You are trying to issue a sudo command in the target shell. sudo wants to prompt a user for a password, but there isn't a tty to do it.

sudo also supports an "askpass" program method of input of a password, but this is different from the SSH_ASKPASS program that is used on z/OS to authenticate the ssh session.

Post Reply