10 More Discussions You Might Find Interesting
1. Red Hat
I´m replacing an old linux enterprise redhat 4.5 by a new one linux enterprise redhat 6.
In both I use rexec as a communication between the front end and the user.
In the old one, when the user connects, the communication establishes quickly (less than 3 sec). But in the new one, the... (1 Reply)
Discussion started by: mig28mx
2. UNIX for Advanced & Expert Users
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
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
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. UNIX for Dummies Questions & Answers
how do i/is there a way to return the exit code from the remote host?
echo $? from the local host only gives 0, if the rexec command itself executes successfully. But what if in the case of the remote command failiing? echo $? on the localhost still gives 0, but I'm interested in the exit code... (4 Replies)
Discussion started by: diego_sapphire
5. UNIX for Advanced & Expert Users
I have enabled the RSH and Rexec command in my HP-UX server but when i try to send any command to the server it returns Execute Permission Denied except commands like ls-l
C:\rsh xxx.xxx.xxx.xxx -l mpac mxpkill 12
the mxpkill command work when I log to the server using telnet with the same... (0 Replies)
Discussion started by: fhuwaidy
6. Shell Programming and Scripting
I would like to do a rexec to execute a C exe (prog.e) :
rexec -l user -p password host prog.e
When I execute this command, I have this error :
prog.e : can not find lib.o
But, When I execute prog.e directly in the remote machine : well done ! No error output.
Thks for your... (4 Replies)
Discussion started by: Lika
7. UNIX for Advanced & Expert Users
Hi UNIX gurus.....
have a doubt..can i run a script in a remote machine by using something like
rexec add.corp.afg.com /aa/ss/remtescript
I dont want to use the rsh command due to some security issues.
rahul26 :) (2 Replies)
Discussion started by: rahul26
How is rexec enabled on a Solaris 8?
How can I check if rexec is installed? (1 Reply)
Discussion started by: pmj1970
9. UNIX for Dummies Questions & Answers
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.
mike (1 Reply)
Discussion started by: raichuu
10. UNIX for Dummies Questions & Answers
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
REXEC(3) Linux Programmer's Manual REXEC(3)
rexec - return stream to a remote command
#define _BSD_SOURCE /* See feature_test_macros(7) */
int rexec(char **ahost, int inport, char *user,
char *passwd, char *cmd, int *fd2p);
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
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.
Not in POSIX.1-2001. Present on the BSDs, Solaris, and many other systems. The rexec() function appeared in 4.2BSD.
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.
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)