Switch User Command in unix

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
arati
Participant
Posts: 8
Joined: Mon Aug 29, 2005 4:05 am

Switch User Command in unix

Post by arati »

Is there any way to switch the user login between the current session? We are using 'su' command but it is asking for the password.This we want to implement in script so there any way to pass password as an argument or any other command?Please help us.Thank you.
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Could you please explain, what you are going to do? Sometimes there are other solutions that fit better to the problem than that what you think.

Wolfgang
arati
Participant
Posts: 8
Joined: Mon Aug 29, 2005 4:05 am

Post by arati »

We are using our development id to run some scripts but for some file transfer we required to login with other user id. Currently we use su , but the issue we face is it asks for password. So, we are unable to perform this operation through script. Do you have any ideas/suggestions ?
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

Use a shell script to run the file FTP and pass the required username and password as part of the ftp script. (read up on FTP options)
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Use indirection to put the password into the input stack.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply