03-06-2008
It's your quoting, the telnet is trying to run back on host1, it's not getting passed to host 2 as a commandline parameter due to the pipe not being properly escaped into a subshell.
Have a go with " \" ' and ( some more to find what you need to protect the | better.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi
what is the main difference between rlogin and telnet? Or they are synonymous
cheers (13 Replies)
Discussion started by: g-e-n-o
13 Replies
2. UNIX for Dummies Questions & Answers
Hello Friends,
I had an IRIX box won't let me login with any IDs (even root) Telnet, Rlogin, SSh. However, I can login by single user with root ID.
Telnet login >>> Connection closed by forgeign host.
Rlogin >>> Connection closed
SSh login >>> connection to address ???.????.???.??? ... (1 Reply)
Discussion started by: anphdula
1 Replies
3. Shell Programming and Scripting
I am logged into an AIX Unix box. From there I want to remotely login to remotely login to an HP-UX Unix box and want to execute a command that will create a file. I want to get the file to the AIX box. Can someon eplease advise how to automate that in a shell script? At the first step I want to... (2 Replies)
Discussion started by: asutoshch
2 Replies
4. Shell Programming and Scripting
Hi Forumers,
Sorry if it's really simple, but I couldn't find a way out. :(
I've to do something like this in a script (csh):
<some commands, variable settings, scripts>
rlogin different_server
<some commands, variable settings, scripts>
After "rlogin", it shows the prompt of the... (5 Replies)
Discussion started by: sumitgarg
5 Replies
5. Solaris
Hi,
I have a Sun Ultra 5 desktop with Solaris 8. When I telnet/rlogin into any other host, the connection closes after few hours of inactivity.
I also have another Windows box which I use rarely. But when I telnet/rlogin into the same hosts using putty, the connection stays for days without any... (5 Replies)
Discussion started by: dr_gsb
5 Replies
6. IP Networking
Hai guys,
Both "rlogin" and "telnet" are used to login remote host.Is there any differece between these 2 commands? (or) are both same?
Thanks (1 Reply)
Discussion started by: Felicia23
1 Replies
7. Shell Programming and Scripting
Hi
I wanted to know if we can write a nested case in UNIX script.
Something like following -
Case ${sDB} in
Srvr1)
case ${sSchema}
Sch1)
DBusr=Username1
DBPwd=Pwd1
;;
Sch2)
DBusr=Username2
... (1 Reply)
Discussion started by: sumeet
1 Replies
8. Shell Programming and Scripting
I want to make a script which will execute a command from a remote server like below
rlogin server1
then
telnet server2
(username, password will be given)
now execute command (it may "ls -l *.txt") and give the output
I've to do this manually but want to make it automatic
Script may... (4 Replies)
Discussion started by: shoeb
4 Replies
9. Shell Programming and Scripting
I am writing a script to do rlogin to another system and execute commands on the remote system, i can successfully login to the remote system but the commands are not sent. i can only use rlogin to get to the remote system.
what can i do? (6 Replies)
Discussion started by: aydj
6 Replies
10. Shell Programming and Scripting
Hi guys, I'm try making to script for eliminate files rlogins.
path1='/home/*'
for i in `cat /etc/passwd |awk -F: '{print $6}'`; do
if test "$i" = "$path1"; then
echo $i
cd $i
if ; then
echo "$i/.rhosts detectado"|mail -s "rhosts" root
... (14 Replies)
Discussion started by: nena_redbalon
14 Replies
LEARN ABOUT DEBIAN
expect_passmass
PASSMASS(1) General Commands Manual PASSMASS(1)
NAME
passmass - change password on multiple machines
SYNOPSIS
passmass [ host1 host2 host3 ... ]
INTRODUCTION
Passmass changes a password on multiple machines. If you have accounts on several machines that do not share password databases, Passmass
can help you keep them all in sync. This, in turn, will make it easier to change them more frequently.
When Passmass runs, it asks you for the old and new passwords. (If you are changing root passwords and have equivalencing, the old pass-
word is not used and may be omitted.)
Passmass understands the "usual" conventions. Additional arguments may be used for tuning. They affect all hosts which follow until
another argument overrides it. For example, if you are known as "libes" on host1 and host2, but "don" on host3, you would say:
passmass host1 host2 -user don host3
Arguments are:
-user
User whose password will be changed. By default, the current user is used.
-rlogin
Use rlogin to access host. (default)
-slogin
Use slogin to access host.
-ssh
Use ssh to access host.
-telnet
Use telnet to access host.
-program
Next argument is a program to run to set the password. Default is "passwd". Other common choices are "yppasswd" and "set
passwd" (e.g., VMS hosts). A program name such as "password fred" can be used to create entries for new accounts (when run as
root).
-prompt
Next argument is a prompt suffix pattern. This allows the script to know when the shell is prompting. The default is "# " for
root and "% " for non-root accounts.
-timeout
Next argument is the number of seconds to wait for responses. Default is 30 but some systems can be much slower logging in.
-su
Next argument is 1 or 0. If 1, you are additionally prompted for a root password which is used to su after logging in. root's
password is changed rather than the user's. This is useful for hosts which do not allow root to log in.
HOW TO USE
The best way to run Passmass is to put the command in a one-line shell script or alias. Whenever you get a new account on a new machine,
add the appropriate arguments to the command. Then run it whenever you want to change your passwords on all the hosts.
CAVEATS
Using the same password on multiple hosts carries risks. In particular, if the password can be stolen, then all of your accounts are at
risk. Thus, you should not use Passmass in situations where your password is visible, such as across a network which hackers are known to
eavesdrop.
On the other hand, if you have enough accounts with different passwords, you may end up writing them down somewhere - and that can be a
security problem. Funny story: my college roommate had an 11"x13" piece of paper on which he had listed accounts and passwords all across
the Internet. This was several years worth of careful work and he carried it with him everywhere he went. Well one day, he forgot to
remove it from his jeans, and we found a perfectly blank sheet of paper when we took out the wash the following day!
SEE ALSO
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995.
AUTHOR
Don Libes, National Institute of Standards and Technology
7 October 1993 PASSMASS(1)