Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent question about disable services

Status
Not open for further replies.

netcomander

Programmer
Jul 20, 2001
68
0
0
DE
hi all,

these days I sat up a new server. Then started to disable
the services I don't use.

e.g. for telnet I added in the korresponding
xinetd.conf-file "disable = yes"
I then tried to connect via telnet... it still worked

I commented out the telnet lines in /etc/services
I then tried to connect via telnet... it still worked

at least I renamed the telnet daemon in.telnetd
then, how to expect, I achieved my goal.

But I can hardly believe, that I have to remove or rename
the daemons of the services, to disable them.

I hope to get a hint of how to disable a service
(for example telnet) without kicking of its daemon, or
why my changes on the xinetd.conf-files caused nothing.

(I sure did ./xinetd reload after the changes)

greetings markus

 
Hi,

This question could be too obvious but, is inetd running?. If it is running, is the line for telnetd commented?

Best regards.
 
Hi,

Are you sure that version of linux is using xinetd ? Some still use the earlier inetd and you'd need to change /etc/inetd.conf if that were the case.

Also, the 'telnet' service refers only to the telnet server operating on port 23. It sometimes surprises people that disabling that does not prevent people telnetting to other servers - e.g. 'telnet localhost 80' or 'telnet localhost 110' for http and pop3 respectively.

Otherwise, I could only guess that you either didn't restart xinetd properly :

/etc/rc.d/init.d/xinetd restart

or you started the telnetd standalone (inadvertently) and that was still running.
You can see whats listening on port 23 (xinetd or telnetd direct) as root :

/usr/sbin/lsof -i TCP:23

Hope this helps


 
hi ifincham,arathorn,

(by the way, inetd is not running ;)

/usr/sbin/lsof -i TCP:23
returns this

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
xinetd 20058 root 3u IPv4 241800 TCP *:telnet (LISTEN)

Have I really to restart xinetd
(thought ./xinetd reload would be sufficient)?

thanks so far to you both

greetings markus

 
Hi,

As ifincham has told if you make any change in the configuration files you mus restart the xinet daemon using
the command:

/etc/init.d/xinetd restart

You can use this command for enabling or disabling services:


and you can use that command to see if your changes are OK.

Best regards.
 
Hi,

I suggest you better do stop and start for xinetd. Once you modify the xinetd.d/telnet configuration file, just try this :

/etc/rc.d/init.d/xinetd stop
/etc/rc.d/init.d/xinetd start


There is some minor difference between restarting the services and stopping and starting the services.

regards,
Mahesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top