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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Block all user telnet access to System, except super-user

Status
Not open for further replies.

psyche0417

Technical User
Feb 21, 2003
1
US
Hi,

Is there anyway I can block all users, except for the super-user, telnet access to our UNIX system, without using firewall? We only want to block telnet access, i,e. they still have to be able to log in from the workstations on the internal network. Oh by the way, our UNIX network resides inside the corporate NT network, which already has a firewall. So can we use the NT firewall for this purpose?

Thanks!

psyche0417
 
You could try putting something like this in /etc/profile after the export LOGNAME PATH line:

[tt]if [ "$LOGNAME" != root ]
then
PPID=`ps -o ppid -p $$ | grep -v PPID`
if [ "`ps -o comm -p $PPID | grep -v COMM`" = in.telnetd ]
then
echo telnet access disabled for non-root users.
sleep 3
exit
fi
fi[/tt] Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top