rexec on RedHat

rexec on RedHat

Post by matti_knuutt.. » Thu, 13 Jan 2000 04:00:00



Hello all,

Does anyone know how to get rexecd running on RedHat 6.0?
I've seen many postings by people who are having trouble with
this feature, but fewer answers. So I would really appreciate
any pointers.

Anyway, I have a machine running RedHat 6.0. I'm trying to
run a command in that machine using rexec on an NT box. No success
so far. After I type in the password, there is a delay of a couple
of seconds. Then the following appears in /var/log/messages on
the Linux box:

Jan 12 15:25:24 linux in.rexecd[696]: connect from dev6

dev6 is the NT box. DNS is not in use, so I have dev6 listed
in /etc/hosts.

tcpd should not be the problem, since /etc/hosts.allow and
/etc/hosts.deny are empty. (And yeah, the machine is not connected
to the Internet...)

I know that in RedHat 6.0 (and 6.1) rexec is disabled by PAM by default.
One should be able to enable it by uncommenting the "pam_nologin.so"
line in /etc/pam.d/rexec. I have done just that.

Anyway, to me it looks like the problem is not with tcpd or
PAM. Am I right in thinking that the log message is output by
in.rexecd? For some reason it just can't get its work done!

To investigate further, I wrote some java to encode and send the
rexec request myself. After the log message appears, my java
program receives an End-Of-File from the socket.

As said, any pointers or ideas would be very much appreciated.

Regards,

- Matti

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

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. Strange harddrive problems...

3. Rexec & Redhat 7.0?

4. iptables nat question...

5. Rexec Redhat 6.2 problem

6. sco command `setcolor` equivalent under solaris?

7. RedHat 7.0 problem with rexec and PAM

8. Why does Linux use multiple partitions?

9. RedHat 5.0, why not rexec?!

10. Problems in rsh and rexec on redhat 7.1

11. Rexec & Redhat 7.0?

12. rexec doesn't work on redhat 4.0

13. rexec broken on RedHat 6.1?