Sponsored Content
Full Discussion: rexec not working properly
Operating Systems Linux rexec not working properly Post 302721231 by bakunin on Thursday 25th of October 2012 09:13:44 AM
Old 10-25-2012
I can't say for Fedora but on AIX you also need the portmapper service enabled. Might that be the case here too?

Further, according to this there might be proper name resolution necessary. Is that the case?

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Keyboard not working properly...

Hello Again, Those that have noticed my earlier posts will know that I have succesfully installed Solaris 8 onto my pc. I haven't been able to get x-server working (i think it doesn't like my video card) though I've been able to log into root (with a bit of help from unix forums :o ) and have... (2 Replies)
Discussion started by: timresh
2 Replies

2. Programming

y is this not working properly?

#include <stdio.h> #include <sys/types.h> #include <string.h> #include <sys/stat.h> #include <unistd.h> struct stat s; main() { char c; if (fork()==0) { system("clear"); do { printf("myAI\\>§ "); scanf("%s",c); if(stat(c,&s)>-1) {... (3 Replies)
Discussion started by: C|[anti-trust]
3 Replies

3. UNIX for Dummies Questions & Answers

Telnet is not working properly

telnet at my system is behaving stange. Some times I am able to telnet to other machines but sometimes it stop doing that. Then i have to reboot the machine and most of the time (not 100%) it works. SImilar is the case with SSH. Sometime it works , some time it don't. i am new to Unix and I do not... (1 Reply)
Discussion started by: deepak_pathania
1 Replies

4. HP-UX

Cron - Not working properly

Hi, I do have three scripts. Whcih inserts records into a table using sqlldr, creating some reprot files etc. The first script will call the second and then the second will call the third. When I run my first script from the shell prompt, all my operation are completed successfully. If I do... (23 Replies)
Discussion started by: risshanth
23 Replies

5. Shell Programming and Scripting

\n not working properly

Hi all, I'm trying to generate a series of txt files starting from a plain csv file part of my code: #!/bin/ksh INSTALLDIR=/Users/ME/Installdir CSV=CSV.csv TMP=/tmp/$(basename $0).txt tr -s "\r" "\n" < /$INSTALLDIR/$CSV > $TMP function Makefiles { printf '%24s:%30s\n' "sometext"... (1 Reply)
Discussion started by: Jive Spector
1 Replies

6. UNIX for Advanced & Expert Users

Sendmail is not working properly

Hi All, Can any one help me to solve the issue. The Issue is, i have started the sendmail service on my RHEL 4 update 6 box, I am able to send the mail from my box to almost all of the Email Id's except few. Exampe, test mail. . Output is :the message is sent. now if I send the... (2 Replies)
Discussion started by: akhtar.bhat
2 Replies

7. Red Hat

sudo is not working properly

This is the first time for using sudo for me. # visudo ## Allows people in group admin to run all commands %admin ALL=(ALL) ALL # groupadd admin # useradd temp # usermod -a -G admin temp # id temp uid=506(temp) gid=506(temp) groups=506(temp),507(admin) # #sudo... (5 Replies)
Discussion started by: getrue
5 Replies

8. UNIX for Dummies Questions & Answers

~c is not working properly with -r option

Hi There, --------- file1 ------- ~c asd@ac.com -------------- Now i am using below command cat file1|mailx -s " testing" -r " My Name" abc@tech.com (3 Replies)
Discussion started by: Tapan Sharma
3 Replies

9. Shell Programming and Scripting

Why is sort not working properly here ?

Platform: RHEL 5.4 In the below text file I have strings like following. $ cat /tmp/mytextfile.txt DISK1 DISK10 DISK101 DISK102 DISK103 DISK104 DISK105 DISK106 DISK107 DISK108 DISK109 DISK110 DISK111 DISK112 DISK113 DISK114 (8 Replies)
Discussion started by: kraljic
8 Replies

10. Shell Programming and Scripting

Join not working properly

I want to join two files , with file 1 col 3 and file 2 col 1 as key. The join command is erratic for some reason. File 2 is a master file having all the names, and file 1 has some values. I want to add the names from fil2 in file 1. If I use the original master file, some output is missing. ... (16 Replies)
Discussion started by: ritakadm
16 Replies
rexec(3)						     Library Functions Manual							  rexec(3)

NAME
rexec, rexec_r - Allow command execution on a remote host LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <netdb.h> #include <unistd.h> int rexec( char **host, int port, char *user, char *passwd, char *command, int *err_file_desc); The following function is supported in order to maintain backward compatibility with previous versions of the operating system. int rexec_r( char **host, int port, char *user, char *passwd, char *command, int *err_file_desc, struct hos- tent_data *host_data); PARAMETERS
Contains the name of a remote host that is listed in the /etc/hosts file or /etc/resolv.conf file. If the name of the host is not found in either file, the rexec() fails. Specifies the well-known Internet port to use for the connection. A pointer to the structure that con- tains the necessary port can be obtained by issuing the following library call: getservbyname("exec", "tcp") Points to a user ID that is valid on the host. Points to the password of the specified user ID on the host. Points to the name of the command to be executed at the remote host. Specifies the file to which standard error from the remote command is sent. If the err_file_desc parameter is 0 (zero), the standard error of the remote command is the same as standard output. No provision is made for sending arbitrary signals to the remote process. In this case, however, it may be possible to send out-of-band data to the remote com- mand. If the err_file_desc parameter is nonzero, an auxiliary channel to a control process is set up, and a descriptor for it is placed in the err_file_desc parameter. The control process provides diagnostic output from the remote command on this channel and also accepts bytes as signal numbers to be forwarded to the process group of the command. This diagnostic information does not include remote authorization failure, since this connection is set up after authorization has been verified. Per-thread data for reentrant version. DESCRIPTION
The rexec() (remote execution) function allows the calling process to execute commands on a remote host. If the rexec() connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the calling process and is given to the remote command as standard input and standard output. The user and passwd parameters specify a valid user ID and the associated password for that user on the remote host. If the user and passwd parameters are not supplied, the rexec() function takes the following actions until finding a user ID and password to send to the remote host: It searches the current environment for the user ID and password on the remote host. It searches the user's home directory for a file called $HOME/.netrc that contains a user ID and password. It prompts the user for a user ID and password. Note that action 3 does not apply when using rexec_r(). NOTES
The rexec_r() function is the reentrant version of rexec(). It is supported in order to maintain backward compatibility with previous ver- sions of the operating system. The netdb.h header file defines the hostent_data structures. RETURN VALUES
Upon successful completion, the system returns a socket descriptor to the remote command. Otherwise, a value of -1 is returned, indicating that the specified hostname does not exist. FILES
Contains hostnames and their addresses for hosts in a network. This file is used to resolve a hostname into an Internet address. Contains the name server and domain name. Contains automatic login information. RELATED INFORMATION
Functions: getservbyname(3), rcmd(3), rresvport(3), ruserok(3). Commands: rexecd(8). delim off rexec(3)
All times are GMT -4. The time now is 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy