Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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

share|improve this question

migrated from Jul 17 '11 at 17:19

This question came from our site for professional and enthusiast programmers.

I 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. – q0987 Jul 17 '11 at 16:29
You 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? – andrewdski Jul 17 '11 at 16:42
@andrewdski, No, I don't understand why it is disabled. May you explain a little for me? – q0987 Jul 17 '11 at 17:16
One reason is that time and daytime have been useless ever since NTP was created. – grawity Jul 17 '11 at 17:32
It is disabled because it is vulnerable to denial of service attacks. See for example: – andrewdski Jul 17 '11 at 18:04
up vote 1 down vote accepted

/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.

share|improve this answer
You can automate the first approach as sudo -e /etc/xinetd.d/daytime , which will invoke an editor as you, not root, on a copy. – Kevin Reid Jul 17 '11 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.