Passing Parameters from UNIX shell script

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Passing Parameters from UNIX shell script

Post by admin »

Im trying to execute a DS job from a UNIX shell script using the Command Line interface. This works fine except all the parameters( including userid, password in my case) are exposed on the command line if someone runs a ps command from a UNIX session. Has anyone worked out a way to pass these parameters securely ?


Peter
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi Peter,
if you are using "dsjob" command line, you can add "-file" option and specifies the username, password and server into a file:

dsjob -file ..........

If you need more info check the "Datastage Server Job Developers Guide".

I think it can help you.

Regards,
Riccardo

----- Original Message -----
From: "Peter Oates"
To:
Sent: Wednesday, October 10, 2001 12:50 AM
Subject: Passing Parameters from UNIX shell script


> Im trying to execute a DS job from a UNIX shell script using the
> Command
Line interface. This works fine except all the parameters( including userid, password in my case) are exposed on the command line if someone runs a ps command from a UNIX session.
> Has anyone worked out a way to pass these parameters securely ?
>
>
> Peter
>
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Peter,

Make sure when you run the dsjob command line make sure that your password is secure by setting the filename with the appropriate permission.

Kent


----- Original Message -----
From: "Riccardo Tani"
To:
Sent: Wednesday, October 10, 2001 6:10 PM
Subject: Re: Passing Parameters from UNIX shell script


> Hi Peter,
> if you are using "dsjob" command line, you can add "-file" option and
> specifies the username, password and server into a file:
>
> dsjob -file ..........
>
> If you need more info check the "Datastage Server Job Developers
> Guide".
>
> I think it can help you.
>
> Regards,
> Riccardo
>
> ----- Original Message -----
> From: "Peter Oates"
> To:
> Sent: Wednesday, October 10, 2001 12:50 AM
> Subject: Passing Parameters from UNIX shell script
>
>
> > Im trying to execute a DS job from a UNIX shell script using the
Command
> Line interface. This works fine except all the parameters( including
userid,
> password in my case) are exposed on the command line if someone runs a
ps
> command from a UNIX session.
> > Has anyone worked out a way to pass these parameters securely ?
> >
> >
> > Peter
> >
> >
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Sorry, I should have been more specific.
Im having a problem with my job parameters ( ie. Database login, DB password ) rather than the
DS Server params. Im taking the defaults on the DS Server params as the user running the shell script will be assumed to have access to the DS Server. Is there a way for DS to read the job parameters from a secure file ?

Peter


-----Original Message-----
From: Riccardo Tani [mailto:rtani@datamat.it]
Sent: Wednesday, 10 October 2001 6:10 PM
To: datastage-users@oliver.com
Subject: Re: Passing Parameters from UNIX shell script


Hi Peter,
if you are using "dsjob" command line, you can add "-file" option and specifies the username, password and server into a file:

dsjob -file ..........

If you need more info check the "Datastage Server Job Developers Guide".

I think it can help you.

Regards,
Riccardo

----- Original Message -----
From: "Peter Oates"
To:
Sent: Wednesday, October 10, 2001 12:50 AM
Subject: Passing Parameters from UNIX shell script


> Im trying to execute a DS job from a UNIX shell script using the
> Command
Line interface. This works fine except all the parameters( including userid, password in my case) are exposed on the command line if someone runs a ps command from a UNIX session.
> Has anyone worked out a way to pass these parameters securely ?
>
>
> Peter
>
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi Peter,
sorry but I thought you were talking about DS username and password. I think that the following way is a solution to read job parameters from a secure file:

1. Put parameters in a file
2. Open this file and read parameters from a job control:
OpenSeq..............
.........
Loop
While Readseq......
......
3. Pass parameters to job from the job control:

DSSetParam(,,)

I hope it can help.

Riccardo


----- Original Message -----
From: "Peter Oates"
To:
Sent: Thursday, October 11, 2001 4:05 AM
Subject: RE: Passing Parameters from UNIX shell script


> Sorry, I should have been more specific.
> Im having a problem with my job parameters ( ie. Database login, DB
password ) rather than the
> DS Server params. Im taking the defaults on the DS Server params as
> the
user running the shell script will be assumed to have access to the DS Server.
> Is there a way for DS to read the job parameters from a secure file ?
>
> Peter
>
>
> -----Original Message-----
> From: Riccardo Tani [mailto:rtani@datamat.it]
> Sent: Wednesday, 10 October 2001 6:10 PM
> To: datastage-users@oliver.com
> Subject: Re: Passing Parameters from UNIX shell script
>
>
> Hi Peter,
> if you are using "dsjob" command line, you can add "-file" option and
> specifies the username, password and server into a file:
>
> dsjob -file ..........
>
> If you need more info check the "Datastage Server Job Developers
> Guide".
>
> I think it can help you.
>
> Regards,
> Riccardo
>
> ----- Original Message -----
> From: "Peter Oates"
> To:
> Sent: Wednesday, October 10, 2001 12:50 AM
> Subject: Passing Parameters from UNIX shell script
>
>
> > Im trying to execute a DS job from a UNIX shell script using the
Command
> Line interface. This works fine except all the parameters( including
userid,
> password in my case) are exposed on the command line if someone runs a
ps
> command from a UNIX session.
> > Has anyone worked out a way to pass these parameters securely ?
> >
> >
> > Peter
> >
> >
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

I tried this out and if yourre quick you can catch the parameters being passed on the DSRunJob call; using the ps command: eg.
psmith 14100 14098 1 10:59:52 ? 0:00 phantom DSD.RUN jtwhDimCustLoad 0/50 pDBPasswd=secret: pSourceServ

-----Original Message-----
From: Riccardo Tani [mailto:rtani@datamat.it]
Sent: Thursday, 11 October 2001 6:23 PM
To: datastage-users@oliver.com
Subject: Re: Passing Parameters from UNIX shell script


Hi Peter,
sorry but I thought you were talking about DS username and password. I think that the following way is a solution to read job parameters from a secure file:

1. Put parameters in a file
2. Open this file and read parameters from a job control:
OpenSeq..............
.........
Loop
While Readseq......
......
3. Pass parameters to job from the job control:

DSSetParam(,,)

I hope it can help.

Riccardo


----- Original Message -----
From: "Peter Oates"
To:
Sent: Thursday, October 11, 2001 4:05 AM
Subject: RE: Passing Parameters from UNIX shell script


> Sorry, I should have been more specific.
> Im having a problem with my job parameters ( ie. Database login, DB
password ) rather than the
> DS Server params. Im taking the defaults on the DS Server params as
> the
user running the shell script will be assumed to have access to the DS Server.
> Is there a way for DS to read the job parameters from a secure file ?
>
> Peter
>
>
> -----Original Message-----
> From: Riccardo Tani [mailto:rtani@datamat.it]
> Sent: Wednesday, 10 October 2001 6:10 PM
> To: datastage-users@oliver.com
> Subject: Re: Passing Parameters from UNIX shell script
>
>
> Hi Peter,
> if you are using "dsjob" command line, you can add "-file" option and
> specifies the username, password and server into a file:
>
> dsjob -file ..........
>
> If you need more info check the "Datastage Server Job Developers
> Guide".
>
> I think it can help you.
>
> Regards,
> Riccardo
>
> ----- Original Message -----
> From: "Peter Oates"
> To:
> Sent: Wednesday, October 10, 2001 12:50 AM
> Subject: Passing Parameters from UNIX shell script
>
>
> > Im trying to execute a DS job from a UNIX shell script using the
Command
> Line interface. This works fine except all the parameters( including
userid,
> password in my case) are exposed on the command line if someone runs a
ps
> command from a UNIX session.
> > Has anyone worked out a way to pass these parameters securely ?
> >
> >
> > Peter
> >
> >
>
Locked