Solved

Telnet login

Posted on 2000-02-21
6
370 Views
Last Modified: 2010-04-21
How can I restrict some groups of users to user Telnet service ?

Andrew
0
Comment
Question by:andrewyu
6 Comments
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
Do you want to force them to use/prevent them from using telnet to connect TO your server (instead of ftp/rlogin/rsh) or do you want to prevent them from using telnet FROM yur server to ther hosts?
0
 
LVL 15

Expert Comment

by:samri
Comment Utility
andrewyu,

  On some flavor of unix, you can put /bin/false at the login shell
 for example:
 To prevent user guest from getting to telnet to you machine just change the shell to /bin/false.
 
  guest:x:1003:10:Guest Login:/home/guest:/bin/false

  As for the group.  I'm not sure, I think that you have do the same thing to each and every one in that group.   Tedious huh.  Well you can write a simple script to do the updates.

good luck,

samri
0
 

Author Comment

by:andrewyu
Comment Utility
Actually, I want to know how can I grant a group of user to use Telnt service ?

Andrew
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Accepted Solution

by:
ddavis42 earned 0 total points
Comment Utility
If you are using wrappers, and the users are logging in from the same IP addresses each time, you can edit the /etc/netperm-table file and lock them out by excluding their IP addresses.  Kind of a brute force method, but it will work.
0
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
Create a list of users who are allowed telnet access, e.g. /etc/telnet.allow; Make sure only root can change this file;

Modify /etc/profile, to add the following lines

if [ -n `ps -ef |grep $PPID |grep telnetd` ]
#i.e. connected by telnet
then
      if [ -z `grep $LOGNAME  /etc/telnet.allow ]
      # i.e. user is NOT in the list of allowed telnet users
            echo "You are not allowed telnet access"
            #exit 0
      fi      
fi

After thorough testing, uncomment the "exit 0" line.

Note that this does not check for rlogin or rsh access
0
 

Author Comment

by:andrewyu
Comment Utility
Thank you very much !

Andrew
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now