Operating System - HP-UX
1838105 Members
3661 Online
110124 Solutions
New Discussion

Re: disable/enable ftp and cron daemon

 
Paolo Gilli
Frequent Advisor

disable/enable ftp and cron daemon

Hi,
Is possible disable/enable ftp and crontab daemon from command line? if yes, how?

Thankyou
Paolo
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: disable/enable ftp and cron daemon

For cron:

/sbin/init.d/cron stop
/sbin/init.d/cron start

For ftp:
edit /etc/inetd.conf and comment out the ftp line, then run "inetd -c".


Pete

Pete
Geoff Wild
Honored Contributor

Re: disable/enable ftp and cron daemon

ftp:

vi /etc/inetd.conf change line:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l

to:

#ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l

then inetd -c

Cron, easier:

/sbin/init.d/cron stop
/sbin/init.d/cron start

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jeff_Traigle
Honored Contributor

Re: disable/enable ftp and cron daemon

As opposed to SAM, I guess. Not a simple command to run, but, yes, they can be disabled without SAM.

You disable ftp by editing /etc/inetd.conf and commenting the ftp line. Save and quit. Run "inetd -c".

For cron, you have to edit /etc/rc.config.d/cron. Change CRON=1 to CRON=0. That will keep it from starting next boot. (If it's running and you want to shut it down immeditaely, run "/sbin/init.d/cron stop" before making the edit to /etc/rc.config.d/cron.)
--
Jeff Traigle
Raj D.
Honored Contributor

Re: disable/enable ftp and cron daemon

Hi Paolo ,

for disabling FTP:

1]

A. # vi /etc/inetd.conf
Put comment (#) in the line :

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a -u000

B. # inetd -c

( To re-read the inetd.conf file )

2] for disabling cron :

# /sbin/init.d/cron stop

For permanent stop :
In /etc/rc.config.d/cron file make CRON=0


Enjoy ,
hth,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "