CoZLauncherÝN¨: version: 1.3.2 2009-07-14
CoZLauncherÝN¨: Copyright (C) Dovetailed Technologies, LLC. 2006. All rights reserved
CoZLauncherÝI¨: Agent output WTO is OFF
CoZLauncherÝI¨: ssh tunnelling is ON
CoZLauncherÝI¨: CoZServer listener socket bound to: 127.0.0.1:8040
dirname: /usr/local/coz/bin/read_passwd_dsn.sh 1: FSUM7351 not found
/fromdsn: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
sed: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
dirname: /usr/local/coz/bin/read_passwd_dsn.sh 1: FSUM7351 not found
/fromdsn: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
sed: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
dirname: /usr/local/coz/bin/read_passwd_dsn.sh 1: FSUM7351 not found
/fromdsn: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
sed: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
dirname: /usr/local/coz/bin/read_passwd_dsn.sh 1: FSUM7351 not found
/fromdsn: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
sed: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
Permission denied, please try again.
dirname: /usr/local/coz/bin/read_passwd_dsn.sh 1: FSUM7351 not found
/fromdsn: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
sed: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
Permission denied, please try again.
dirname: /usr/local/coz/bin/read_passwd_dsn.sh 1: FSUM7351 not found
/fromdsn: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
sed: /usr/local/coz/bin/read_passwd_dsn.sh 11: FSUM7351 not found
Permission denied (publickey,password,keyboard-interactive).
CoZLauncherÝE¨: ftptestÖ131.97.150.186 target command '<default shell>' ended with RC=255
CoZLauncherÝI¨: CoZLauncher ended with RC=255
No commands are recognize in the shell-script. I tried to add an "echo-line" but that also failed.
I realize that the script will run remotely but the problem is /usr/local/coz/bin/read_passwd_dsn.sh and as far as I understand, that script is running on z/OS under USS.
It logs on to the remote machine but when it is going to read and deliver the password, it fails.
Please verify that "/usr/local/coz/bin" is the location where you installed the Co:Z files and the the file "/usr/local/coz/bin/read_passwd_dsn.sh" is executable by the userid that is running the batch job.
And I think that the script is executing but it is the instructions in the script that isn't recognized. As I mentioned earlier, if I add a line echo Some text I get the message
echo: /usr/local/coz/bin/read_passwd_dsn.sh 3: FSUM7351 not found
added to the lines with errors.
As I understand it, the script is executed but the interpreter does not understand the content of the script and that is what I don't understand.
If I run the script from the command line or using COZBATCH or AOPBATCH the interpreter understands it but it will off course fail to do anything useful that way.
#! /bin /sh
# This shell script is a front-end to the Co:Z "fromdsn" command
# and will read the contents from the dataset named in the $PASSWD_DSN
# environment variable and write it to stdout
# This is designed to be used with a dataset that contains a single record
# containing the password. Leading and trail blanks are removed from the
# record (but not trailing line sequence numbers!!).
COZ_BIN=`dirname $0`
"$COZ_BIN/fromdsn" "$PASSWD_DSN" | sed 's/^ *\(.*\) *$/\1/'
Can you try running it from a z/OS Unix shell like this:
Have you found any solution for this problem. As you can see in my previous posts, the script read_passwd_dsn.sh is working when you run it from the z/OS Unix shell but not when it is run as part of the CoZ procedure!
I am at a loss to explain why the "read_passwd_dsn.sh" shell script is failing in your environment.
The Co:Z Launcher spawns the IBM Ported Tools "ssh" command, and it forks this shell as a command when you have SSH_ASKPASS set. There seems to be something different in the USS environment that is preventing it from finding any Unix commands (like dirname, which is in /bin).
I have seen situations where shell scripts fail when they are run under a codepage that causes misinterpretation of special characters, but from the trace it looks like yours is set to LANG=C.
The symptoms indicate that the $PATH is not set when the shell script runs. Perhaps you can add the following line before the other commands in this read_passwd_dsn.sh shell script:
echo PATH=$PATH
And check to see that PATH includes /bin. If it does, then I believe that there is something wrong with your Unix environment and that the FSUM7351 message that you are getting is incorrect - there is something else wrong and you may have to open a PMR with IBM to see what it is.
An alternative would be to have a shell script with only the following line:
cat //\'$PASSWD_DSN\'
Since "cat" is a shell built-in.
Note: that this will require that the password dataset have RECFM=V or RECFM=VB and that the password record contain no leading or trailing spaces.
Or, you could replace the shell script with a simple program that opens the dataset and writes out the password to stdout.