- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Control the 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-09-2006 01:37 AM
02-09-2006 01:37 AM
Control the telnet
telnet session in the system , now if I want to keep the max. no of telnet unchange (300) ,
but three specific users ( eg. userA , userB ,userC ) not count into this 300 session , is
it possible ?
for example ,
there are 300 user are in the system currently , if userA , userB & userC are also in the
system , the general user can still login until the no. of telnet reach to 303 ( as these
three users not count into the 300 , in short , the login of these specific users are
separate from general user ,
I really need help on that , but not sure whether I have mention about it , please let me
if not clear , thx in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 01:42 AM
02-09-2006 01:42 AM
Re: Control the telnet
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 01:44 AM
02-09-2006 01:44 AM
Re: Control the telnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 02:09 AM
02-09-2006 02:09 AM
Re: Control the telnet
However, you looking to restrict users A,B and C on when they can login to the system based on the rule of number of users already logged in.
Perhaps you can try 'Set Authorised Login Times' for these specific users. The flip side, the system has to be converted to a trusted system.
Hope this helps.
Cheers,
Sanjay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 02:28 AM
02-09-2006 02:28 AM
Re: Control the telnet
This is not a dynamic variable as far as i know, so, it cant be possible.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 02:53 AM
02-09-2006 02:53 AM
Re: Control the telnet
I think, the easiest way is to do al little test in the .profile or .login script
if [ `who | wc -l` -gt > 300 ]
then
exit
fi
Off course this must be customize to evaluate also userA, userB & userC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 02:57 AM
02-09-2006 02:57 AM
Re: Control the telnet
You can do this.
Set the limit higher on the system in the kernel.
Use /etc/profile to check the user count and reject users greater than 300 except for the users you wish to be invincible.
ucount=$(ps -ef | grep telnetd |wc -l)
# or use Bill Hassell's code.
# Now you have your count.
letlog=0
if [ $ucount -ge 300 ]
then
if [ "$LOGNAME" == userA ]
then
letlog=0
else
letlog=1
fi
fi
if [ $letlog -eq 0 ]
then
echo "do nothing, letting special user log in"
else
echo "Too many users, try again..."
exit 1
fi
All you need to do is change the if statement for userA into a list, perhaps a for loop to allow all good users.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com