Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3399  / 2 Years ago, sun, september 18, 2022, 4:15:23

I want to remove unnecessary services in Ubuntu server 13.04 for hardening purpose.
I don't know use which blow command for dedicate services:
1. inintct list
2. sysv-rc-conf list
3. ls /etc/init.d
4. service --status-all



why outputs of each above command are different?
I tried stop atd service with "service atd stop", but after reboot system this
service start again.
Since I want hardening my server, how to disable a service permanently?
and which services should be disable?



Thanks.


More From » 13.04

 Answers
4

/etc/init.d holds the start up/shut down scripts for various services, but they are actually invoked by the scripts in /etc/rc*.d.



The rc*.d scripts are actually hold symbolic links to /etc/init.d scripts, and the names in the rc*.d directories say whether to start or stop a service as you enter that run level - the number in the name gives the order in which to run the scripts.



So, for example, /etc/rc3.d/S23ntp says to start the ntp daemon at run level 3 (after all the lower numbered services have been started).



So - to stop a service running after a reboot, the best thing to do is manipulate the rc*.d scripts.



And the best way to do that is to use the update-rc.d command. e.g. to disable ntp at boot, run:



update-rc.d ntp disable


As to what services to disable - be careful that you understand what a service does and its purpose before disabling it.



I was going to give atd as an example - this is a process that uses very little resource, but stopping it may have unintended consequences.



But as it turns out, atd is actually invoked by a different mechanism (upstart) - and I don't have time to go in to that now!


[#28336] Monday, September 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
measord

Total Points: 259
Total Questions: 131
Total Answers: 106

Location: Venezuela
Member since Sun, Oct 2, 2022
2 Years ago
measord questions
Wed, Jul 14, 21, 21:39, 3 Years ago
Mon, May 16, 22, 21:12, 2 Years ago
Mon, Oct 11, 21, 03:11, 3 Years ago
Sun, Apr 17, 22, 21:22, 2 Years ago
;