Disable atd (and other unnecessary startup processes) in Ubuntu?

10,658

I think you are looking for /etc/init/atd.conf:

➜  ~  cat /etc/init/atd.conf                                                    
# atd - deferred execution scheduler
#
# at is a standard UNIX program that runs user-specified programs at
# scheduled deferred times

description     "deferred execution scheduler"

start on runlevel [2345]
stop on runlevel [!2345]

expect fork
respawn

exec atd

Ubuntu uses still upstart, and their scripts are stored in /etc/init/. You can just remove the whole file or just commenting out the start on stanza.

Share:
10,658

Related videos on Youtube

rholmes
Author by

rholmes

I have fun exploring new technologies and learning a little bit about a lot of things. I would like to explore the intersection of cognitive sciences, machine learning, and computer tooling to increase the effectiveness of knowledge workers, with an emphasis on software design and productivity, interface design, and academic / cognitive workflows. Reach out to me if you're interested! Please see my LinkedIn profile for my professional life. I'm also on researchgate.net, mostly to be notified of papers published by my more academically-oriented colleagues.

Updated on September 18, 2022

Comments

  • rholmes
    rholmes over 1 year

    I just spun up a new 12.04 server and have been having a bit of trouble getting the atd daemon to stop auto-launching. There's been a bit of changing around on the management of startup processes, and I've viewed dozens of web pages on upstart, sysv-rc-conf, and other start management systems (not to mention chk-config, which isn't available anymore on Ubuntu anyway)…

    I tried using sysv-rc-conf, but with the configuration as follows, I still have atd running on reboot:

    # sysv-rc-conf --list atd 
    atd          0:off  1:off   2:off   3:off   4:off   5:off   6:off
    

    Even though it's not upstart-compatible, I put "manual" into /etc/init/atd.override

    I've also tried a couple of variant invocations of update-rc.d, but despite the promising output, atd still launches on reboot:

    # update-rc.d atd disable 0123456
    update-rc.d: warning:  start runlevel arguments (none) do not match atd Default-Start values (2 3 4 5)
    update-rc.d: warning:  stop runlevel arguments (none) do not match atd Default-Stop values (0 1 6)
     Disabling system startup links for /etc/init.d/atd ...
     Removing any system startup links for /etc/init.d/atd ...
       /etc/rc0.d/K80atd
       /etc/rc1.d/K80atd
       /etc/rc2.d/K80atd
       /etc/rc3.d/K80atd
       /etc/rc4.d/K80atd
       /etc/rc5.d/K80atd
       /etc/rc6.d/K80atd
     Adding system startup for /etc/init.d/atd ...
       /etc/rc0.d/K80atd -> ../init.d/atd
       /etc/rc1.d/K80atd -> ../init.d/atd
       /etc/rc6.d/K80atd -> ../init.d/atd
       /etc/rc2.d/K80atd -> ../init.d/atd
       /etc/rc3.d/K80atd -> ../init.d/atd
       /etc/rc4.d/K80atd -> ../init.d/atd
       /etc/rc5.d/K80atd -> ../init.d/atd
    

    I'd prefer not to just brute-force it and whack the scripts, but after all this, that's what I'm tempted to do. Are there any recommended (or just practical and maintainable) ways to deal with startup issues like this in Ubuntu 14.04?

    • Admin
      Admin about 10 years
      Upstart and its documentation are so ridiculously obtuse this way I can only believe it is 100% intentional, but if you look at the answer here: askubuntu.com/questions/19320/how-to-enable-or-disable-servi‌​ces there is an upstart specific method (echo manual >> /etc/init/whatever_service.override).
    • Admin
      Admin about 10 years
      Thanks for the suggestion, but I've already done the echo into *.override, but when I reboot it still comes up. It's because, I believe, that the atd daemon is NOT yet converted over to upstart. That's when I dug up the legacy tools, after installing chkconfig failed (a few days ago I was dealing with the fact that chkconfig is no more on Ubuntu - and had just got myself used to the idea… trying to "like" upstart).
    • Admin
      Admin about 10 years
      Now when I put the override in the right place…. Was wondering why no .conf files. Thanks.
    • Admin
      Admin about 10 years
      This is a useful question, but not about atd. atd is a basic system service, expected to be present on every unix system. You shouldn't disable it.
    • Admin
      Admin about 10 years
      Yeah, why would you want to disable atd in the first place? If you want to prevent unprivileged users from using it, man at.allow.
    • Admin
      Admin about 10 years
      @Giles: (and Nate) This is a lean (underpowered) headless server with no (known) uses for at/atd at the time. CSF was complaining about long-running processes, and before just exempting it, I read around a bit and saw that there were several sets of articles about turning atd off (either for security, or to reduce resource consumption, or to boot faster). Are you aware of any system services that require at? Or is it just that people "expect" it? Thanks.
  • rholmes
    rholmes about 10 years
    I'm starting to see that I somehow started on the wrong track by cd-ing to /etc/init.d (which I knew was wrong) but didn't go to init/ -- so I asked a silly question. Thanks for the quick response, anyway!
  • goldilocks
    goldilocks about 10 years
    Out of curiosity (I'm not much of a ubuntu user), are you sure changes to these files won't get overwritten later by a package update? Eg., .conf file for atd changes, and so a new .conf is installed and you mysteriously return to the same default start/stop levels.
  • Ludwig Schulze
    Ludwig Schulze about 10 years
    @TAFKA'goldilocks' only if the maintainer do some change, in which case debconf will start nagging if you want to overwrite them.