Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11

    Quote Originally Posted by pinhead View Post
    The goal is to write a simple shell script LAN messaging program that sends messages by using rcp. Normal users should be able to send messages only to one user, admins should be able to send messages to all users. The client computers send messages to a central mediator host that stores and forwards them to the target hosts if they are reachable.

    I am not limited to the Bash shell.
    Can you not use existing means for chatting, such as the text-based "talk" program (and "wall" for root), or the erlang-based ejabberd, if a full-on GUI is desired?
    Last edited by atreyu; 10-30-2012 at 08:43 PM. Reason: link to talk and wall man pages

  2. #12
    No, write, talk, wall and message are not allowed. But maybe xinetd or inetd could be helpful?

  3. #13
    xinetd and inetd are just daemons that run other network-related daemons/scripts. Yes, they could be in charge of start/stopping your daemons, but you still need to write those daemons.

  4. $spacer_open
  5. #14
    Thank you. I have read that the Inetd daemon listens on specific network ports for incoming connections. After a connection has been established, the daemon sends all data to the program, that corresponds to this port. Maybe I could use this program as mediator server that receives and stores messages and later sends them to the target hosts?

    Here is an image that shows how the whole construct shall look like:
    Last edited by pinhead; 10-30-2012 at 10:49 PM.

  6. #15
    Sorry, I got side-lined...

    Do you mean something like the example service described here? Even so, you'd still need to write the actual code to do the message processing, even though inetd is controlling it.

    However, this approach does not even use rcp, so I'm confused...

  7. #16
    This approach is written in C, but mine should be only based on shell script. rcp is now working, but after dispatching the file I am getting the error "select: protocol failure in circuit setup". The same error message appears when I use rsh.

    I found three websites that describe how xinetd shall be configurated:

    Here, the files etc/xinetd.d/rsh and etc/xinetd.d/rlogin are mentioned. Do both have to be altered?

    Here, the server /usr/sbin/in.rshd is referenced in the file /etc/xinetd.d/shell. Why not in /etc/xinetd.d/rsh?

    Here, the server /usr/sbin/in.rshd is referenced in the file /etc/xinetd.d/rsh.

    Now I am bit confused about which files have to be altered to make rcp and rsh work. When do I have to write a service in /etc/xinetd.d/login and when in /etc/xinetd.d/rlogin?
    Last edited by pinhead; 11-07-2012 at 04:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts