LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to disable services ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-disable-services-836025/)

pinga123 10-03-2010 11:49 PM

How to disable services ?
 
I would like to know how would i disable service which helps mounting of removable devices automatically?

I dont want to disable mounting but i would like to disable automatic mounting of devices.

I would like to do this as security major on one of our production server.

vishesh 10-03-2010 11:51 PM

I think autofs service is responsible to automatic mounting of devices.

Thanks

evo2 10-03-2010 11:53 PM

It depends on what you are using for the automounting. Some possibilities are autofs, gnome-volume-manager, pmount etc. So you need to find out what is mounting the devices and then you can work out how to disable it.

Evo2.

Bryanlee 10-04-2010 12:10 AM

What version of linux are you using?

pinga123 10-04-2010 12:38 AM

My distribution details.
Quote:

# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: OracleVMserver
Description: Oracle VM server release 2.2.0
Release: 2.2.0
Codename: n/a

Quote:

# uname -a
Linux OFSMUW-VS-61 2.6.18-128.2.1.4.9.el5xen #1 SMP Fri Oct 9 14:57:31 EDT 2009 i686 i686 i386 GNU/Linux

pinga123 10-04-2010 12:44 AM

I do have autofs service in my distribution.

Will this command enough ?

Quote:

#chkconfig autofs off.

evo2 10-04-2010 01:30 AM

I don't use chkconfig, but I understand that that it can be used to disable services on some OSs. I can only suggest that you check the man page to make sure you have the syntax correct and then try it.

Evo2.

pinga123 10-04-2010 02:22 AM

Quote:

Originally Posted by evo2 (Post 4116908)
I don't use chkconfig, but I understand that that it can be used to disable services on some OSs. I can only suggest that you check the man page to make sure you have the syntax correct and then try it.

Evo2.

Its a service and not a command .What man pages are you referring to.

prayag_pjs 10-04-2010 06:00 AM

To disable auto-loading of the ISCI device driver, add the following line to the /etc/modprobe.conf file:

alias drivername off

For example

alias sym53c8xx off

onebuck 10-04-2010 06:08 AM

Hi,

Quote:

Originally Posted by pinga123 (Post 4116925)
Its a service and not a command .What man pages are you referring to.

'man chkconfig' shows you the information as suggested;

Quote:

excerpt from chkconfig;

DESCRIPTION chkconfig provides a simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories. This implementation of chkconfig was inspired by the chkconfig command present in the IRIX operating system. Rather than maintaining configuration information outside of the /etc/rc[0-6].d hierarchy, however, this version directly manages the symlinks in /etc/rc[0-6].d. This leaves all of the configuration information regarding what services init starts in a single location.
chkconfig has five distinct functions: adding new services for management, removing services from management, listing the current startup information for services, changing the startup information for services, and checking the startup state of a particular service.
When chkconfig is run without any options, it displays usage information. If only a service name is given, it checks to see if the service is configured to be started in the current runlevel. If it is, chkconfig returns true; otherwise it returns false. The --level option may be used to have chkconfig query an alternative runlevel rather than the current one.
...
You could always do a 'man command' from the cli but the online manuals are hand\y.
:hattip:


All times are GMT -5. The time now is 10:35 PM.