- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: modify number of telnet sessions
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 05:37 PM
11-11-2001 05:37 PM
how do i limit telnet sessions to specific users? for example, i want usera to only be allowed 3 telnet sessions, the other only 1 or 2, is that possible? or is it a universal (sort of) parameter that when you set it, everybody will be affected?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 05:42 PM
11-11-2001 05:42 PM
Re: modify number of telnet sessions
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 05:47 PM
11-11-2001 05:47 PM
Re: modify number of telnet sessions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 05:54 PM
11-11-2001 05:54 PM
Re: modify number of telnet sessions
http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x5e06670142b2d5118ff10090279cd0f9,00.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 06:00 PM
11-11-2001 06:00 PM
Re: modify number of telnet sessions
That is correct you would have to write a script or modify something like /etc/profile.
You could put these people into
separate groups that could comprise of one, two
or three users. The below is a sample of what
you could do wiuth /etc/profile.
# Restrict 'root' direct login to 'console' only
RealName=`who am i|cut -f1 -d\ `
case $RealName in
root) WHERE=Y ;;
ingres) WHERE=Y ;;
dba) WHERE=Y ;;
xcom) WHERE=Y ;;
*) WHERE=N ;;
esac
if [ "$WHERE" = "Y" -a "`tty`" != "/dev/console" ]; then
echo "\n\tYou MUST login under your own ID first.....bye^G^G^G"
exit 1
fi
unset RealName WHERE
Also have a look at this link, you will find it interesting.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x5e06670142b2d5118ff10090279cd0f9,00.html
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 06:12 PM
11-11-2001 06:12 PM
Re: modify number of telnet sessions
http://www.itso.iu.edu/howto/tcpwrap-unix.epl
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 06:18 PM
11-11-2001 06:18 PM
Re: modify number of telnet sessions
can you please provide me sample script where i can restrict a certain user to only telnet a number of times? lets say i will only allow userA to have a max number of 5 telnet sessions.. can that be done?
Thanks again...
sorry, im not that familiar with scripting...
:-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 06:30 PM
11-11-2001 06:30 PM
Re: modify number of telnet sessions
if someone hasn't down it by tomorrow morning (monday my time EST), I'll whip one up.
What version of HPux do you have, and do you have "perl" installed?
thanks,
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 06:32 PM
11-11-2001 06:32 PM
SolutionHi Another way to do this would be to call
another script that evaluates the
user profile before actually runnning it.
Here is a sample, that I had where /etc/profile
calls this script, 'eval_class.ksh'
function multiLogins # allow/disallow
{
typeset Flag=$1 ttyID
#
# Display login information
if [ "$(who |grep -c $LOGNAME)" -gt 1 ]; then
typeset ttyID="$(who -R |awk -v user="$LOGNAME" '{if($1 == user){ printf "Terminal: %s from location: %s\n ",$2,$6}}')"
clear
print "\n\t You are Currently logged in on the following terminals:"
print " -------------------------------------------------------"
print " $ttyID \n"
sleep 5
#
if [ "$Flag" = "disallow" ]; then
print "\n Contact your Supervisor "
print " You will now be logged out"
sleep 5
exit
fi
fi
}
# test for batch mode login
if tty -s; then
# test and set the type of terminal used
#
MYCLASS=GENERAL
eval $(grep 'MYCLASS=' $HOME/.profile 2>/dev/null)
export MYCLASS
#
# check if multiple logins are permitted
#
case ${MYCLASS} in
GENERAL) multiLogins disallow ;;
SUPERV*) multiLogins allow ;;
ADMIN) multiLogins allow ;;
esac
#
fi
#
unset checkFlag TTYTYPE
HTH
-Michael