cancel
Showing results for 
Search instead for 
Did you mean: 

telnet

 
sandeep mathur
Respected Contributor

telnet

how to block a particular user from accessing telnet service.
5 REPLIES
Rob Leadbeater
Honored Contributor

Re: telnet

Hi,

Set that user's shell to something that doesn't allow logins... So in /etc/passwd change that users shell (the last attribute) to something like /bin/false

Cheers,

Rob
Steven Schweda
Honored Contributor

Re: telnet

You could also remove the user completely.

What, if anything, would you like the user to
be _able_ to do?
sandeep mathur
Respected Contributor

Re: telnet

how to remove that is what the question is?
loco_vikide
Frequent Advisor

Re: telnet

I assume that you referred to preventing a particular local user getting access to telnet command on local machine to telnet to another machine.

If this is the case and you want to allow other users access telnet service, then you could use ACL (Access Control List) on the telnet executable file.
Sergejs Svitnevs
Honored Contributor

Re: telnet

If you want to disable telnet, the command "whereis telnet" will tell you the abolute path of telnet on your machine. On my PC it's "/usr/bin/telnet".

"ls -l /usr/bin/telnet" will list the owner (root), group (root) and the permissions of the file. You should change the group to your special group name (e.g. admins) and adjust the permissions so that only new group and root have permission to execute the telnet binary. The commands are (you must have root privileges):

Change the group:
# chgrp admins /usr/bin/telnet

Remove execute permissions from others, add to group:
# chown o-x,g+x /usr/bin/telnet

BR