How to enable daytime service on ubuntu
9,884
/etc/xinetd.d/*
is only writable by root. You can copy it to your home directory (cp /etc/xinetd.d/daytime ~
), edit that, and then copy it back with root permission (sudo cp ~/daytime /etc/xinetd.d
). Or you can edit it in-situ with an editor you trust to run as root, a la sudo someeditor /etc/xinetd.d/daytime
.
Related videos on Youtube
Author by
q0987
Updated on September 18, 2022Comments
-
q0987 over 1 year
I have found the following info on my machine
user@ubuntu:/etc/xinetd.d$ cat daytime # default: off # description: An internal xinetd service which gets the current system time # then prints it out in a format like this: "Wed Nov 13 22:30:27 EST 2002". # This is the tcp version. service daytime { disable = yes type = INTERNAL id = daytime-stream socket_type = stream protocol = tcp user = root wait = no } # This is the udp version. service daytime { disable = yes type = INTERNAL id = daytime-dgram socket_type = dgram protocol = udp user = root wait = yes }
Question:
How to enable the daytime service?
// Update // I have problems to do the step2
Step 1:
sudo aptitude install xinetd
Step 2: Next you'll need to enable the daytime and echo services by editing their config files in /etc/xinetd.d (you should only need to change the disable option from yes to no)
Step 3: sudo invoke-rc.d xinetd reload
-
q0987 over 12 yearsI have tried to directly modify the file /etc/xinetd.d/daytime and change the disable yes to no. But I am not able to save it.
-
Admin over 12 yearsYou need to invoke the editor with sudo as well, so that you have permission to save the file. Also, you do understand why the daytime service is disabled right?
-
q0987 over 12 years@andrewdski, No, I don't understand why it is disabled. May you explain a little for me?
-
user1686 over 12 yearsOne reason is that time and daytime have been useless ever since NTP was created.
-
andrewdski over 12 yearsIt is disabled because it is vulnerable to denial of service attacks. See for example: descriptions.netvigilance.com/tc/15039.
-
-
user3540003 over 12 yearsYou can automate the first approach as
sudo -e /etc/xinetd.d/daytime
, which will invoke an editor as you, not root, on a copy.