I want to turn off several services which I do not use (I think?) whenI connect to the internet. These are (in rc.0 order): httpd, mysql, samba, nfsd, rpc, sshd, saslauthd, openldap, messagebus, and as in rc.0 end with /bin/sync and /bin/sleep 3.
I am unsure of ssalauthd, openldap and messagebus in particular.
The objective is to have as few services available as possible to thwart any hackers.
The means for turning these off would be as in rc.0 and in that sequence. I will turn them back on in rc.M order.
Any notes or suggestions will be very helpful.
When I run sh /etc/rc.d/rc.nfsd stop i get the default case returned i.e. "usage ......" Whi won't this behave?
If your distro has /sbin/chkconfig (I know Red Hat and Fedora do, maybe others?) you can just use
/sbin/chkconfig service_name off
Or else, you could remove the links from /etc/rc.*, if your system uses symlinks in each runlevel
chkconfig have --level option too,
chkconfig --level 4 httpd off will turn off httpd in run level 4.