- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how can I limit telnet
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
02-23-2003 11:45 PM
02-23-2003 11:45 PM
For example,I need the system allow less than 5 telnets, any more will be refused.
What should I do then?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2003 11:54 PM
02-23-2003 11:54 PM
Re: how can I limit telnet
You can use under shell script for limit a number of users on your system.
# Limit number of logins alowed
Times_allowed=4
Time_in=`who | grep $LOGNAME | wc -l`
if [ $Time_in -gt "$Times_allowed" ]
then
echo "$LOGNAME is already logged in $Times_allowed times!"
exit
exec /bin/login
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 12:28 AM
02-24-2003 12:28 AM
Solutioncd /dev/pts
lssf * | grep tels | wc -l
This totals the number of telnet device files (logins) allowed. Simply move out of this dir (to say a temporary dir in case you want them back later or else you will have to run insf) those you dont want leaving say 5 which limits telnet logins to 5 for the server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 01:13 AM
02-24-2003 01:13 AM
Re: how can I limit telnet
kernel parameter nstrtel decides the no. of telnet sessions. usually it w'll be set to 60. reduce it to 5 and build the kernel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 01:26 AM
02-24-2003 01:26 AM
Re: how can I limit telnet
If you are referring to users' concurrent accesses pls take note:
On 10.20 is a hard task, on 11.0 you onlys need define in /etc/default/security file:
NUMBER_OF_LOGINS_ALLOWED=3 (must be in caps)
This apply for no-root users (su excluded)
And certify that PHCO_27721 patch is installed. Look a symtom solved by this patch:
When the maximum number of logins to the system allowed for each user is specified by the NUMBER_OF_LOGINS_ALLOWED field in the /etc/default/security file, users whose names are longer than 4 bytes are treated as the same user if the first 4 bytes of the user names are identical.
Other way could be include in /etc/profile file followings lines:
MAX=3
CURRENT=`who|grep $LOGNAME|wc -l`
if [ $CURRENT -gt $MAX ]
then
exit
fi
Rgds.