![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FTP Download username and password | kumarrana | UNIX for Dummies Questions & Answers | 2 | 05-11-2008 05:45 PM |
| username password in script | roshanjain2 | Shell Programming and Scripting | 5 | 02-13-2007 02:47 AM |
| setting username and password for ftp | div | UNIX for Advanced & Expert Users | 1 | 12-08-2006 08:09 AM |
| passing password to rlogin | jagannatha | Shell Programming and Scripting | 2 | 10-17-2002 10:13 PM |
| redirecting username to finger | dhinojosa | UNIX for Dummies Questions & Answers | 2 | 02-06-2002 09:11 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
redirecting password as username for rlogin
Is the following even possible ? by echo $3, I mean enter password when prompted for it. My main issue is that it would deal with a prompted password, which is passed from the command line like this:
./processing serverA user password I cannot not use expect here, I heard that was very useful. So please if any tips thanks very much #bin/ksh _mainProcessing() { _checkUsage $* remoteLogin $server1 $dba1 $pw1 } _checkUsage() { if [ -n "$1" ] && [ -n "$2" ] && [ -n "$3" ] then server1=$1 dba1=$2 pw1=$3 else echo echo " -- usage: table_check <server1> <dba1> <passwd1>" echo exit ${FALSE} fi } remoteLogin () { echo "starting login to $1 as $2 using password $3" echo "$3 " | rlogin -n -l $2 $1 echo "finished login" } _mainProcessing $* |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
No, that will not work.
A better way to deal with this, assuming you can't use a rhost setup, or ssh with key authentication would be to use expect. |
||||
| Google The UNIX and Linux Forums |