Fastload - keeping your logon id and password secure

Tools & Utilities
Enthusiast

Fastload - keeping your logon id and password secure

I had a bright idea and wrote a Unix shell script that requires a Teradata logon and password as parameters. I thought I could then could substitute that logon on and password into my fastload script without saving it into a file anywhere. However my attempt with sed failed as fastload thinks the sed statement the file. Has anyone managed to overcome this?

This is what I did:

First I tried the statement below on its own, which works, outputting the fastload script with the logon and password in the right place (logonid was the dummy word I had put after .logon and the IP address before the ;

sed 's/logonid/logon,password/g' <FLOAD_DIM_BRANCH.txt

Then I tried it with fastload command

cagcrd:BADEV:/badata/wtdata/scripts >fastload < sed 's/logonid/logon,password/g' <FLOAD_DIM_BRANCH.txt

A file or directory in the path name does not exist.

ksh: sed: 0403-016 Cannot find or open the file.

Reading up on UNIX it looks like redirection does not let you do this but I have hopes that someone out there knows a way around it.

Regards,

Susan
2 REPLIES
Teradata Employee

Re: Fastload - keeping your logon id and password secure

Based on your description, you want to "pipe" the stdout from sed to stdin for fastload.

sed 's/logonid/logon,password/g' <FLOAD_DIM_BRANCH.txt | fastload
Enthusiast

Re: Fastload - keeping your logon id and password secure

Extremely grateful thanks, that worked a treat.

Best wishes,

Susan