Disk Arrays
cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling service

SOLVED
Go to solution
mehul_3
Regular Advisor

Disabling service


Hi there!
I want to disable some of the services as follows
echo time nfs snmp mysql http and as per my knowledge, the
entry should be added for these with allow/deny with host address.
But I could not find such file in /var/adm but in /usr/newconfig/var/adm.
What should be the action taken? Can entry be added in /usr/newconfig/var/adm
where I find inetd.sec file?

Immediate response would be appreciated.

Regards
Mehul
7 REPLIES
Duncan Edmonstone
Honored Contributor

Re: Disabling service

This is posted in the wrong place - should be in the HPUX forum.

Editing inetd.sec won't *disable* the service, it will simply block certain IPs from accessing the service. If you want to disable the services you should edit /etc/inetd.conf and comment out the relevant services and then restart inetd using 'inetd -c'

HTH

Duncan

HTH

Duncan
mehul_3
Regular Advisor

Re: Disabling service

There is not entry for the following services that I can commented out in inetd.conf to disable the same
nfs snmp mysql http
pl, guide me

Regards
mehul
Naveej.K.A
Honored Contributor

Re: Disabling service

Hi,

inetd daemon reads the /etc/inetd.conf during bootup to start network services.

you can check if the services are running by

ps -ef |grep -e snmp -e bind -e http -e sql

and then find out which script has started the service and can disable / remove the script which started the service.

Regards,
Naveej
practice makes a man perfect!!!
mehul_3
Regular Advisor

Re: Disabling service

As per intruction, I used grep command finding that snmp, mysql, http etc has been running.But how to disable these services.

Waiting for reply

Mehul
Nguyen Anh Tien
Honored Contributor
Solution

Re: Disabling service

Do like this
vi /etc/services
#rem services you want
#echo 7/tcp # Echo
#echo 7/udp #
discard 9/tcp sink null # Discard
discard 9/udp sink null #
systat 11/tcp users # Active Users
#daytime 13/tcp # Daytime
#daytime 13/udp #
qotd 17/tcp quote # Quote of the Day
chargen 19/tcp ttytst source # Character Generator
chargen 19/udp ttytst source #
ftp-data 20/tcp # File Transfer Protocol (Data)
ftp 21/tcp # File Transfer Protocol (Control)
telnet 23/tcp # Virtual Terminal Protocol
smtp 25/tcp # Simple Mail Transfer Protocol
time 37/tcp timeserver # Time
time 37/udp timeserver #
rlp 39/udp resource # Resource Location Protocol
whois 43/tcp nicname # Who Is
domain 53/tcp nameserver # Domain Name Service
domain 53/udp nameserver #
bootps 67/udp # Bootstrap Protocol Server
bootpc 68/udp # Bootstrap Protocol Client
tftp 69/udp # Trivial File Transfer Protocol
rje 77/tcp netrjs # private RJE Service
finger 79/tcp # Finger
:wq!
then save and exit
#inetd -c
all rem services will be disable.
HTH
HP is simple
Patrick Wallek
Honored Contributor

Re: Disabling service

NFS, MySQL, SNMP, Apache must all be stopped via their start/stop scripts in /sbin/init.d and configuration files in /etc/rc.config.d

First stop the application with the appropriate start/stop script:

# /sbin/init.d/nfs.client stop
# /sbin/init.d/nfs.server stop
# /sbin/init.d/nfs.core stop

# /sbin/init.d/mysql stop
(or some very similar script)

# /sbin/init.d/apache stop
(or whatever script controls apache)

do the same for all SNMP* scripts as there are several.

Once you have them all stopped, modify their configuration files in /etc/rc.config.d and set the variables in the file to a value of 0 (zero) so that they will not start automatically.
Nguyen Anh Tien
Honored Contributor

Re: Disabling service

Right!
NFS, MySQL, SNMP, Apache must all be stopped via their start/stop scripts in /sbin/init.d and configuration files in /etc/rc.config.d
NFS, MySQL, SNMP, Apache is not controled by inetd.
HP is simple