Hi, * Suresh Ramasubramanian <[EMAIL PROTECTED]> [2005-05-13 22:46:19 +0530]: >anuraag chowdhry wrote: >| Can anybody let me know , how do i disallow telnet >| access to user in linux.? > >Easy. Shut down telnetd and use ssh
Or if for some unknown reason, you want o stick to telnet, you can use PAM
to limit the number of users who have access to telnet.
Telnet uses login program to authenticate users. So either modify the
/etc/pam.d/login file for this or user /usr/lib/telnetlogin as a login
wrapper and then do the following.
Add following in /etc/pam.d/telnetilogin:
auth required /lib/security/pam_listfile.so onerr=fail item=user
sense=allow file=/etc/telnetd_users
This will allow only those users to use telnet who are listed in the
/etc/telnetd_users file. Just do a "chmod o-w /etc/telnetd_users" so that the
file is not world writable.
Study the man pages for telnet, telnetd and PAM.
Best suggestion, already suggested by Suresh above - use SSHD instead of
telnetd and that too if you want user restricions for ssh, PAM can be handy
again.
Regards.
--
Ajitabh Pandey
http://www.geocities.com/ajitabhpandey
ICQ - 150615062
Registered Linux User - 240748
GnuPG Key ID - 35CF8CC4
Key fingerprint = E1A8 657D BE0C 4747 52EC 10C4 1AC2 C124 35CF 8CC4
There was a phone call for you.
signature.asc
Description: Digital signature
