Sponsored Content
Top Forums Shell Programming and Scripting Asking username and password in the middle of the Shell/perl script Post 302550277 by pareshpatra on Thursday 25th of August 2011 07:40:12 AM
Old 08-25-2011
Asking username and password in the middle of the Shell/perl script

Can any body help me to find out the logic
I have a script chkcomponent.pl Which give some output
Like
component1 userid: u1
component2 userid: u2
component3 userid: u1
.
.
#The no of components are different in different times run
Now I want this chkcomponent.pl script in another script
myscript.pl/sh

problem:-
I want to check all component are running or not
But the problem is that this component are in different different userid So I want to login to different userid separately and check components individually

So I want to put a logic in myscript.pl/sh
which take all userid as argument and ask for password

So that I will check all the component at a time
Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

username password in script

Can we write a script to telnet to a unix server from unix with the username and password hardcoded in the script?? something like ssh a@b -p password ??? (5 Replies)
Discussion started by: roshanjain2
5 Replies

2. Solaris

i wanto hardcode password for a username to ssh to a server using script

Dear all i want to ssh to a server via running a shell script with a username and i want to hard code the password for that particular username can u help me please Thank u Naree (8 Replies)
Discussion started by: naree
8 Replies

3. Shell Programming and Scripting

Read Oracle Username password SID from single file and pass it to shell

Dear All I am trying to write one shell which will be running through Cron which contain one SQL query. But I want to draw/fetch the Username password and Instance name (required to loging to the database) from one single file to run that SQL query . Also this file contain details of multiple... (2 Replies)
Discussion started by: jhon
2 Replies

4. UNIX for Dummies Questions & Answers

Shell program with username and password

Hi I am new to unix and I am trying to figure out how to write a shell script with a login name and password. I want to do something along the lines of if both are correct it echoes "you are logged in" and if the password is wrong it echoes "wrong password" and same with the login name. I've tried... (7 Replies)
Discussion started by: thedemonhunter
7 Replies

5. Shell Programming and Scripting

Passing username and password to a script running inside "expect" script

Hi I'm trying to run a script " abc.sh" which triggers "use.sh" . abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script. Please find below the scripts: #abc.sh #!/usr/bin/expect -f exec /root/use.sh expect "*name*" send... (1 Reply)
Discussion started by: baddykam
1 Replies

6. Shell Programming and Scripting

shell script getting stopped at the middle.

I have created a shell scrit to run the informatica workflows sequentially.In the script i am executing 7 workflows sequentially after running 4 workflows the scrpt getting stop and it is not continuing next step evn it is updating logs.4th workflow will take more time to finish is that making... (1 Reply)
Discussion started by: katakamvivek
1 Replies

7. Shell Programming and Scripting

How can i make the current shell return from the middle of a script reading?

I am using the popular bash shell. Under the current interactive shell, i run the script like: ". ./myscript.txt" . After the current shell has finish the script, the shell will continue to work as I did previously. Actually I want the shell can return from the middle of the scripts it is... (1 Reply)
Discussion started by: Bill Zhao
1 Replies

8. UNIX for Dummies Questions & Answers

Script to log in SFTP server [with username, password]

Hi, everyone, I am trying to write a script to login automatically using username and password to an sftp server (the key authentication has been disabled so I cannot use that method). I tried to search online for a solution and found a way using "expect" but my boss does not want me to use... (4 Replies)
Discussion started by: warmboy610
4 Replies

9. Shell Programming and Scripting

How to send Two different password in Single script, having same username..?

Hi Team, i want to input two password for single node like pass1/pass2 one of the pass1 is working some node and pass2 is working for some nodes . For nodes having pass1 i have to run different script and for nodes having pass2 i have to run different script Sooo how can put two pass... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies

10. Shell Programming and Scripting

Passing Username & password through shell script to java code

Hi, I have a shell script (script.sh) in which we are calling java code which asks for Username: Password: for authentication purpose currently we are passing the credential manually and run the script. but I am trying echo -e "user_id\npassword" | script.sh but its not... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
PGP(1)							      General Commands Manual							    PGP(1)

NAME
pgpgpg - wrapper around Gnu Privacy Guard that takes Pretty Good Privacy command line options SYNOPSIS
pgpgpg [options] pgpfile pgpgpg -e [options] file user ... DESCRIPTION
PGPGPG is a wrapper that allows calls to GnuPG (Gnu Privacy Guard) using the command line options of (Pretty Good Privacy). PGP and GnuPG are encryption programms with high security encryption engines. However, PGP is available without a fee but is not realy free software. GnuPG on the other hand is realy free software and has additionally features but with a different command line syntax than PGP. The goal of pgpgpg is to plug in a command line syntax in front of GnuPG equal to PGP 2.6. OPTIONS
The following options are supported by pgpgpg notice that long options do not use the usual GNU syntax (--) but, instead are of the form +option[=value]. -e Encrypt a plaintext file. -d, -p Decrypt a plaintext file. -s Sign a plaintext file. pgpgpg -s file [-u userid] -sb Create a separate signature certificate (a .sig file) for a given file. pgpgpg -sb file [-u userid] -c Use convential cryptography when encrypting. -o Output to the file specified. Should only be used for encryption, decryption and signature operations (not for key management). -a, +armor ASCII armor the output file. -u, +myname Select the userid to use for some operations. -kg Generate a unique public/secret pair. -ka Add a public or secret key to your key ring. pgpgpg -ka keyfile [keyring] -kx Extract a copy from your public or secret keyring. pgpgpg -kx[a] userid keyfile [keyring] -kv View the contents of your keyring. pgpgpg -kv[v] [userid] [keyring] -kvc View a key fingerprint. pgpgpg -kvc [userid] [keyring] -kr Remove a key from your keyring. pgpgpg -kr userid [keyring] -kd If acting on your secret key, permanently revoke a key and issue a compromise certificate. If acting on a public key, disable or reenable a key. pgpgpg -kd userid -ke Edit trust parameters for a public key or edit the pass phrase or add a userid to a secret key. pgpgpg -ke userid [keyring] -kc View the contents and check the certifying signatures of your public key ring. pgpgpg -kc [userid] [keyring] -ks Sign and certify someone's public key. pgpgpg -ks userid [-u userid] [keyring] The following options are ignored or unsupported: ++armorlines, +autosign, +bakring, +interactive, +keepbinary, +language, +legal_kludge, +nomanual, +pager, +randseed, +tmp and +tzfix. BUGS
PGPGPG does not currently provide an online help (-h or -?) and will not show a summary of commands, as PGP does, when typing: pgp -k The following options are not documented (yet): +batchmode, +cert_depth, +charset, +encrypttoself, +force, +clearsig, +comment, +com- pletes_needed, +compress, +marginals_needed, +pubring, +secring, +textmode and +verbose. AUTHORS
PGP was originally written by Philip R. Zimmermann. PGPGPG was written by Michael Roth. This manpage was written by Javier Fernandez-Sanguino for the Debian distribution (but may be used by others) by glancing at PGP's manpage and the source code from PGPGPG (pgpopts.c) PGPGPG Version 0.13 PGP(1)
All times are GMT -4. The time now is 06:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy