- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Telnet session
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
01-19-2005 09:40 PM
01-19-2005 09:40 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 10:03 PM
01-19-2005 10:03 PM
SolutionWhat you can do is to allow a little more (75?) and add a script in /etc/profile to display sessions and disconnect when max is reached :
sessionCount=$(who|wc -l)
if [ $sessionCount -gt 70 ] ; then
who -u
echo "Unable to login (max session reached)"
exit
fi
2 points :
. If users use windows telnet, window may close on connection end, so that they can't se the list. It may be better to use cmd, then telnet.
. By setting a max session in inetd, you will also prevent root login. That may be a bad thing for root not to be able to connect. Using the provided script for all but root with a max session to 75 will let root connect in any case.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 10:12 PM
01-19-2005 10:12 PM
Re: Telnet session
user will not get any info unless he/she login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 11:11 PM
01-19-2005 11:11 PM
Re: Telnet session
I think you are right , but after the user get the message , the user still can login into the system , how to logout the user after they see the message and then press "enter" key ? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 12:10 AM
01-20-2005 12:10 AM
Re: Telnet session
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 01:42 AM
01-20-2005 01:42 AM
Re: Telnet session
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 07:19 PM
01-20-2005 07:19 PM
Re: Telnet session
the "read a" is work fine , it will exit after press enter , may I have more requirement , because the system will display the list of 70 users , but one screen can't display all users ( about only 23 users will be display on one screen ) , is it possible that it display first screen then wait the user press key to next screen ( another 23 users ) until all users listed , could suggest what can I do ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 11:45 PM
01-20-2005 11:45 PM
Re: Telnet session
consider using 'who -q' to have a quick and short list of connected users.
else, 'who -u | more' may also give a page by page display, needing the user to hit a key to see all the pages. This may put the never-ending connections again.
HTH,
Ahmed Rahal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 11:54 PM
01-20-2005 11:54 PM
Re: Telnet session
you may skip session test if user is root (or any user below 100, usually, no real users):
---
if [ `id -u` -ge 100 ]; then
sessionCount=$(who|wc -l)
if [ $sessionCount -gt 70 ] ; then
who -q
echo "Unable to login (max session reached)"
sleep 30
logout
fi
fi
---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 12:16 AM
01-21-2005 12:16 AM
Re: Telnet session
who -u | more
more wait for the user to press enter or space to scroll respectively one line or one page from input.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)