rexec command hangs on windows

rexec command hangs on windows

Post by Vive » Tue, 21 Jan 2003 22:17:06



Hi,

My application on Windows NT uses the rexec command to execute certain
remote commands on the Linux server

when I execute
rexec  <servername> -l <user name> <command> on my windows box

it just hangs and I have to do ^C to exit it.

The Linux 8.0 Server had /etc/xinetd.conf configured to pick up the
correct conifguration file i.e /etc/xinetd.d/rexec.

Any information on this would be valuable.

Thanks in Advance
Vivek

 
 
 

1. REXEC client in Java (please help if you're familiar with REXEC programming)

I am working on a Java REXEC (remote execute) client. It was perfect but
I meet a problem when I tried to make it interactive

(when the remote execution prompt the REXEC server for any answer from
the keyboard, the REXEC server will prompt the REXEC client).

This is the step I used :

1.  Open a Socket on port 512 for writing and a Socket on port 300 for
listening
2.  Send the byte 0 (have to do that to initialise a connection)
3.  Send login name in byte (user name on the machine running the REXEC
server)
4.  Send the byte 0 (to commit the login name)
5.  Send password in byte (password associated the the user name)
6.  Send the byte 0 (to commit the password)
7.  Send the command in byte (example : "dir c:\*.bat")
8.  Sent the byte 0 (to commit the command)

9.  Receive the first byte (reading it)
10. - If the last byte is 0, the command executed successfully
      {
      - Read the result byte per byte and display it at screen as long
as I have something to read
      }
    - Else (if the last byte is not 0), the command returned an error
      }
      - Read the error message byte per byte and display it at screen as
long as I have something to read
      }

For sure, I am converting character to byte and byte to character...

If I want to send the command "del c:\*", the REXEC Server may be
prompted by the OS like this (Windows NT) :
"C:\*, Are you sure (Y/N)? "
With the REXEC client, I'll display the message completely. But if I
want to make the client interactive...

Step 10 will look like this :
10.  - If the last byte is 0, the command executed successfully
       {
       - Loop as long as it's not a prompt :
         }
         - Read the result byte per byte and display it at screen as
long as I have something to read
         - If it's a prompt
           {
           - Send the answer in byte, and send the byte 0 to commit
           }
         - Else (it's not a prompt)
           {
           - Break the loop
           }
         }
       }
     - Else (if the last byte is not 0), the command returned an error
       {
       - Read the error message byte per byte and display it at screen
as long as I have something to read
       }

But I don't know how to detect a prompt... (I don't want to test if I am
reading an "Y/N" literal or something like that, I want the REXEC to be
compliant with all (command line) application executed on the server...)

How can I know if there's a prompt or not?

Thanks for your help

Carl Letourneau

2. how to insert a newline in a file? sed?

3. rexec command error

4. up system

5. rexec command

6. How can correct these syslog errors.

7. "rexec" command for Linux?

8. Router/IP-Forwarding And Apache

9. Korn Shell ?: results from an FTP or REXEC command?

10. Using the RPC rexec() command.

11. source for a rexec command and rexecd daemon for Linux?

12. Why do I get a login/password prompt when I use a rexec command?

13. no rexec command in 2.0.35