PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > How to supply username and password to a script while it is running without manual intervention.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

How to supply username and password to a script while it is running without manual intervention.

Réponse
 
LinkBack Outils de la discussion
Vieux 22/05/2007, 21h09   #1
Guna
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to supply username and password to a script while it is running without manual intervention.

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 and advise.

Guna...

  Réponse avec citation
Vieux 22/05/2007, 21h44   #2
Glenn Jackman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to supply username and password to a script while it is running without manual intervention.

At 2007-05-22 04:09PM, "Guna" wrote:
> 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.


Investigate Expect: http://expect.nist.gov/

"Expect is a tool for automating interactive applications ..."

--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h59.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08523 seconds with 10 queries