Sponsored Content
Full Discussion: launching script via REXEC
Top Forums UNIX for Dummies Questions & Answers launching script via REXEC Post 302226653 by JohnMurdoch on Tuesday 19th of August 2008 12:36:51 PM
Old 08-19-2008
launching script via REXEC

Hi folks!

my client uses an winapplication which is launching shell-scripts remotely on a HP-Unix Machine via Rexec.

The application-configuration is launching the script (which is in the home directory of connecting user) like:
Code:
rexec host user pass shell.sh

So far so good, everything works.

Now they decided to get rid of the quite expensive HP-Unix server and asked me to do the same on a Linux-Distro. I set up CentOS and the REXEC-daemon, but....


1. When I launch the script against new Linux server with (same command as it is done towards old HP Unix):
Code:
rexec host user pass shell.sh

it does not work (xinetd gives exitcode 127 : file not found)

2. When I launch the script with:
Code:
rexec host user pass ./shell.sh

it works, but the problem is that i am not allowed to change the settings in the application. So I have to find a solution to launch the script like in point 1 above.

I tried already to put the script-folder to the PATH-variable, but it did not help.

Does somebody know what else I can do? My only little goal is to get this script launched using the commands at point 1.

PS: I know REXEC is not secure, but it's a requirement by company
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

expect (re: rexec)

In http://forums.unix.com/showthread.php?threadid=391 there is one statement called expect. but when I issue command whereis expect, respond from o/s only EXPECT: (only one world). I try to find it at /usr/bin, no expect statement there ? is it default unix o/s command ? I am using AIX on... (1 Reply)
Discussion started by: yatno
1 Replies

2. UNIX for Dummies Questions & Answers

Enabling Rexec ????

Can someone tell me how I would enable Rexec on a UNIX machine? And is the procedure different on the different systems - Solaris, HP-UX -etc. Thanks~!! mike (1 Reply)
Discussion started by: raichuu
1 Replies

3. Solaris

Rexec

How is rexec enabled on a Solaris 8? How can I check if rexec is installed? (1 Reply)
Discussion started by: pmj1970
1 Replies

4. AIX

rexec - other options?

Rexec executes commands one at a time on a remote host. The rexec command provides an automatic login feature by checking for a $HOME/.netrc file. User and password are stored in $HOME/.netrc. I would like to log on to another host and execute a script/command but not using $HOME/.netrc file,... (4 Replies)
Discussion started by: ioniCoder
4 Replies

5. Shell Programming and Scripting

Launching a C program that needs input from a shell script

hi there, i need some help, i am trying to run a script to launch a C program and a Java program but before running both I want to get a user input and then invoke both programs with input received. In the programs the inputs are not command line arguments. This is the code, after the java... (4 Replies)
Discussion started by: momal
4 Replies

6. UNIX for Advanced & Expert Users

Rexec Issue

Hi Team, I am executing some ksh scripts which inturn calls java files in AIX Environment. We have installed java6_64 which is in .profile. But when we execute from rexec its taking path from some different place that does not have java in $PATH variable. Can you please help me find out which... (2 Replies)
Discussion started by: balasubramani04
2 Replies

7. Linux

rexec not working properly

Hi, I am trying to enable rexec to automate certain tasks(it has to be rexec, not ssh or any other due to the system environment), so after switching to linux, I followed the certain instructions that were laid out in the web. My operating system is fedora 17, so I first installed the... (1 Reply)
Discussion started by: wringer
1 Replies

8. UNIX for Advanced & Expert Users

[Solved] Crontab not launching script

Hi all, i have the following script #!/bin/sh for i in `ps -leaf --cols 1024 | grep LogUser | grep -v grep | awk '{print $4}'`; do echo $i kill -15 $i; done; but it seems that the crontab its sciping this script,i configured corntab as following */30 * * * root... (2 Replies)
Discussion started by: charli1
2 Replies

9. Shell Programming and Scripting

Launching mplayer from within Links2 using a shell script

I'm using the Links2 console web browser in graphical mode (the "-g" argument), and launching a shell script that invokes MPlayer from within it. MPlayer works fine. No problem there. The problem, is that I have no control over the MPlayer process. I would like to be able to exit MPlayer whenever... (16 Replies)
Discussion started by: ignatius
16 Replies

10. Shell Programming and Scripting

Statement returning error only launching the sh script via crontab

hi all, I created a sh script to import some tables from mysql to hive. No problem launching it manually, but if I schedule via crontab it returns me an error in the following part: #create an array containing all the tables for $dbname query="SELECT table_name FROM information_schema.tables'... (10 Replies)
Discussion started by: mfran2002
10 Replies
REXEC(3)						     Linux Programmer's Manual							  REXEC(3)

NAME
rexec - return stream to a remote command SYNOPSIS
#define _BSD_SOURCE /* See feature_test_macros(7) */ #include <netdb.h> int rexec(char **ahost, int inport, char *user, char *passwd, char *cmd, int *fd2p); DESCRIPTION
This interface is obsoleted by rcmd(3). The rexec() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise *ahost is set to the standard name of the host. If a username and password are both specified, then these are used to authenticate to the foreign host; otherwise the environment and then the user's .netrc file in his home directory are searched for appropriate information. If all this fails, the user is prompted for the information. The port inport specifies which well-known DARPA Internet port to use for the connection; the call getservbyname("exec", "tcp") (see get- servent(3)) will return a pointer to a structure that contains the necessary port. The protocol for connection is described in detail in rexecd(8). If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be setup, and a descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being Unix signal numbers, to be forwarded to the process group of the command. The diagnostic information returned does not include remote authorization failure, as the secondary connection is set up after authorization has been verified. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data. CONFORMING TO
Not in POSIX.1-2001. Present on the BSDs, Solaris, and many other systems. The rexec() function appeared in 4.2BSD. BUGS
The rexec() function sends the unencrypted password across the network. The underlying service is considered a big security hole and therefore not enabled on many sites, see rexecd(8) for explanations. SEE ALSO
rcmd(3), rexecd(8) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-09-10 REXEC(3)
All times are GMT -4. The time now is 07:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy