LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-22-2002, 09:53 PM   #1
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
rwhod listens but won't talk


Hi guys,

I know not many people really use rwhod thses days (You can't use that! It's all insecure and stuff!) but I am.

I've got a slackware 8.0 box on which rwhod runs delightfully. I have a slakcware 8.0 box on which it will only receive rwho info, but doesn't seem to transmit anything (the other boxes don't have any entries for this box. Infact this box doesn't have an entry for this box!)

I now have an 8.1 box, and rwhod is once again listening, and getting info from other boxes, but it won't populate its own database and no other boxes seem to have any rwho info from it either.

I have run rwhod like this:

/usr/sbin/rwhod

so it should be listening and broadcasting. Infact, it's just the rwhod lines uncommented in /etc/rc.d/rc.inet2

I have no idea where to look for causes of this strange behaviour. Does anyone have any ideas?
 
Old 03-06-2007, 08:41 AM   #2
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Original Poster
Rep: Reputation: 16
Has anyone got any ideas with this? I did find something out, but I stopped using it and am once again looking into it.

Anyone have any experience with rwho/rwhod/ruptime?

tifkat
 
Old 03-06-2007, 11:25 PM   #3
Jeiku
Member
 
Registered: Jul 2005
Posts: 64

Rep: Reputation: 18
Is it disabled with inetd? Can you try some requests and post the tcpdump output from the problem box?

Last edited by Jeiku; 03-06-2007 at 11:27 PM.
 
Old 03-07-2007, 09:17 AM   #4
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Original Poster
Rep: Reputation: 16
I remember that I solved this when I originally posted the question. I can't remember how I arrived at this patch, but it works. Applied it to the source and compiled and it's working as hoped:

*** ./rwhod.c Sun Jul 23 13:19:48 2000
--- /u01/rwhod.c Tue Aug 12 23:59:49 2003
***************
*** 51,56 ****
--- 51,57 ----
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/ip.h>
+ #include <time.h>

#ifndef __linux__
#include <nlist.h>
***************
*** 189,195 ****
exit(1);
}
(void) signal(SIGHUP, huphandler);
! openlog("rwhod", LOG_PID, LOG_DAEMON);

if ((sk = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
syslog(LOG_ERR, "socket: %m");
--- 190,196 ----
exit(1);
}
(void) signal(SIGHUP, huphandler);
! openlog("rwhod", LOG_PID|LOG_NDELAY, LOG_DAEMON);

if ((sk = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
syslog(LOG_ERR, "socket: %m");
***************
*** 359,367 ****
*cp = '\0';
mynamelen = strlen(myname);
if (mynamelen > sizeof(mywd.wd_hostname))
! mynamelen = sizeof(mywd.wd_hostname);
! strncpy(mywd.wd_hostname, myname, mynamelen);
! mywd.wd_hostname[sizeof(mywd.wd_hostname)-1] = 0;

getboottime(&mywd);

--- 360,368 ----
*cp = '\0';
mynamelen = strlen(myname);
if (mynamelen > sizeof(mywd.wd_hostname))
! mynamelen = sizeof(mywd.wd_hostname-1);
! strncpy(mywd.wd_hostname, myname, mynamelen+1);
! mywd.wd_hostname[mynamelen] = 0;

getboottime(&mywd);



tifkat

Last edited by tifkat; 03-07-2007 at 09:51 AM.
 
Old 03-07-2007, 09:19 AM   #5
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Original Poster
Rep: Reputation: 16
(Deleted because I found my patch)

Last edited by tifkat; 03-07-2007 at 09:52 AM.
 
Old 03-07-2007, 09:20 AM   #6
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Original Poster
Rep: Reputation: 16
(Deleted because I found my patch)

Last edited by tifkat; 03-07-2007 at 09:52 AM.
 
Old 03-07-2007, 09:22 AM   #7
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Jeiku
Is it disabled with inetd? Can you try some requests and post the tcpdump output from the problem box?
rwhod doesn't seem to run from inetd. It runs from /etc/rc.d/rc.inet2. It's just running /usr/sbin/rwhod without any arguments.

tifkat
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Who listens to nerd rap? Brain Drop General 4 08-02-2005 02:13 PM
change port sshd listens on GUIPenguin Linux - General 1 05-24-2005 06:51 AM
talk talk daemon configuration ananthkrk Red Hat 1 10-16-2004 12:45 PM
rwhod error messages MJatIFAD Linux - Security 4 09-18-2003 02:31 PM
Rwhod???? l0f33t Linux - Security 2 08-11-2003 03:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration