Unix Shell - How to supply username and password to a script while it is running without manual int

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > May 2007 > How to supply username and password to a script while it is running without manual int





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to supply username and password to a script while it is running without manual int
Guna

2007-05-22, 7:26 pm

I need to run some set of scripts once in a month. For eg i need to
run three scripts 10th of every month. I grouped them into one Master
script file which runs in Kornshell which i can set in cron so that
this master script file will be executed on 10th of every month. But
the subscripts which i have called in the master scripts required
username and password to be supplied.

How can I supply username and password from the Master script itself?
so that the subscripts automatically take the username and password
and complete the task successfully.

for more clarification below is example:

masterfile.ksh

#!/usr/bin/ksh

#To run a sub script

cd /tmp
../subscriptfile1.sh

Need to give the username first and enter... then requires to supply
password. How can i supply the info here?

../subscriptfile2.sh

Need to give the username first and enter... then requires to supply
password. How can i supply the info here?

../subscriptfile3.sh

Need to give the username first and enter... then requires to supply
password. How can i supply the info here?

Thanks in advance for you time and help and advise.

Guna...

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com