1840329 Members
3847 Online
110162 Solutions
New Discussion

rexd daemon and ntp

 
SOLVED
Go to solution
so_2
Regular Advisor

rexd daemon and ntp

Hi All
Pls help me on the following queries.
1. in my server rexd is enabled through inetd. How do i know that some one used rexd service in my server?

2. How can i check that my server is time synchronised using NTP.

Please help.
thanks
S.O
2 REPLIES 2
wip
Frequent Advisor
Solution

Re: rexd daemon and ntp

Hi,

It is quite difficult to say who used this services in the past unless you have enabled logging for this services.How ever you can make out if anybody is using this currently by doing a lsof or netstat on the service port

look for entries in ntp.conf file located in /etc/ directory and if you have a ntp server configured it should have below entries (Entries are sample)

server # local clock
fudge stratum # disciplined by radio clock

to display the status of the daemon on the local machine, or
ntpq -p ntp_server
Bill Hassell
Honored Contributor

Re: rexd daemon and ntp

To log usage of the rexd service, change your entry in /etc/inetd.conf to add the -l option:

rpc stream tcp nowait root /usr/sbin/rpc.rexd 100017 1 rpc.rexd -l /var/adm/rexd.log

Then tell inetd to re-read the conf file: inetd -c

For NTP, just run:

ntpq -p

It will report on the NTP servers that are configured. Setting up NTP is fairly simple once you have found at least 3 to 5 servers that are reachable. To test for connections to NTP servers, use ntpq like this:

ntpq -p 0.pool.ntp.org
ntpq -p 1.pool.ntp.org
ntpq -p 2.pool.ntp.org

If these commands fail with no response, your firewall is probably blocking port 123. Talk to your network administrator about the NTP port.

If all of these work, replace the (lengthy) ntp.conf file in /etc with:

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org

Now check your current time. It should be within a minute or two of accurate time. If you need to change the time (especially backwards), be sure to stop any databases and check on crontab entries to make sure they will not be caught in the timje change. To set the time exactly, you can use:

ntpdate -b 0.pool.ntp.org

That will set the time. Then run xntpd which will keep the time automatically synced. To automatically start xntpd after a reboot, edit the file /etc/rc.config.d/netdaemons to change:

export NTPDATE_SERVER=0.pool.ntp.org
export XNTPD=1

Note that in a data center, ALL computers (PCs, Macs, servers) plus all network appliances and all smart UPS boxes should be using NTP. If there are more than 5-10 devices, talk to your network administrator about confguring the firewall to be an NTP server within your company's network. That way, the network load is reduced and all local systems will point to the firewall's NTP server port.

See these references:

http://ntp.org
http://www.pool.ntp.org/use.html


Bill Hassell, sysadmin