Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16
Like Tree8Likes
Originally Posted by pinhead 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353

    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
    pinhead likes this.

  2. #12
    Just Joined!
    Join Date
    Oct 2012
    Posts
    29
    No, write, talk, wall and message are not allowed. But maybe xinetd or inetd could be helpful?

  3. #13
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    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.
    pinhead likes this.

  4. $spacer_open
    $spacer_close
  5. #14
    Just Joined!
    Join Date
    Oct 2012
    Posts
    29
    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:
    architecture.jpg
    Last edited by pinhead; 10-30-2012 at 10:49 PM.

  6. #15
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    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...
    pinhead likes this.

  7. #16
    Just Joined!
    Join Date
    Oct 2012
    Posts
    29
    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:

    1. http://www.seriss.com/rush-current/misc/rsh-config.html
    Here, the files etc/xinetd.d/rsh and etc/xinetd.d/rlogin are mentioned. Do both have to be altered?

    2. http://www.linuxfromscratch.org/blfs...er/xinetd.html
    Here, the server /usr/sbin/in.rshd is referenced in the file /etc/xinetd.d/shell. Why not in /etc/xinetd.d/rsh?

    3. http://people.redhat.com/kzak/docs/r...gin-howto.html
    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.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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