>Restrict telnet login by user

By | March 5, 2011

>

As we know ssh and telnet can be used for remote login by user. It is very simple to disable telnet service so that no one can login via telnet. But what if we want some user to log in  via telnet and others not.  For example suppose it want to allow user vishesh to log in via telnet and other users  completely not allowed login via telnet

pam_succeed_if pam module should be configured in /etc/pam.d/telnet file to achieve this. Put following entries in /etc/pam.d/telnet

auth     required   pam_succeed_if.so user=vishesh quiet

My advice is create a group by name telnet and add user to that group to allow telnet login, in this scenario put following line as 2nd line  in  /etc/pam.d/telnet

auth   required  pam_succeed_if.so quiet user in group telnet  

Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

One thought on “>Restrict telnet login by user

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *