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

Telnetd connection restriction

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello everyone,

I need to know how to restrict the number of connections users can have active at one. I would like to set my HP 9000 (10.x) to let users have only 3 active telnet sessions going.

Thanks in advance for any suggestions.

 
Hi

Something like this might do - test before implementing

# Limit number of logins allowed
Logins_allowed=2
Logins_in=`who | grep $LOGNAME | wc -l`
if [ $logins_in -gt "$Logins_allowed" ]
then
echo "$LOGNAME is already logged in $Logins_allowed times!"
exit
exec /bin/login
fi

regards
Queenie
 
Hi

Something like this might do i the .profile of the user - test before implementing

# Limit number of logins allowed
Logins_allowed=2
Logins_in=`who | grep $LOGNAME | wc -l`
if [ $logins_in -gt "$Logins_allowed" ]
then
echo "$LOGNAME is already logged in $Logins_allowed times!"
exit
exec /bin/login
fi

regards
Queenie
 
Hi

Put it in the .profile of the users home directory.

Regards
Queenie
 
that worked fine on my linux box.. but doesn't seem to want to work on the HP box.

no errors given.. :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top