The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-12-2005
Registered User
 

Join Date: May 2005
Posts: 24
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 $*
Reply With Quote
Forum Sponsor
  #2  
Old 05-12-2005
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,643
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0