HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- control user login
Operating System - HP-UX
1835215
Members
2343
Online
110078
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-15-2005 03:14 PM
11-15-2005 03:14 PM
control user login
In my server , we only allow 70 telnet session to my system , to control the system resource , if I want to assign 10 telnet session out of these 70 only for a specific login id ( eg. edp_usr ), that mean all users ( except edp_usr ) can only use max. 60 telnet session , another 10 telnet session only reserve for edp_usr , is it possible ? thx.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2005 03:53 PM
11-15-2005 03:53 PM
Re: control user login
Hi
I would like to put a checking on the . profile of that particular user to verify how many users with that particlar username exists, if it is moe than 10 echo a messeage on the screen saying that "Cannot login since login numbers exceeded" and quit.
Something like who -u|awk '{print $1}' and check
Will that do?
Regards
CS
I would like to put a checking on the . profile of that particular user to verify how many users with that particlar username exists, if it is moe than 10 echo a messeage on the screen saying that "Cannot login since login numbers exceeded" and quit.
Something like who -u|awk '{print $1}' and check
Will that do?
Regards
CS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2005 05:20 PM
11-15-2005 05:20 PM
Re: control user login
thx r suggestion ,
I understand your mean but actually I also want to control the normal user can only use 60 telnet session , ( even the edp_usr is not logging on , the common user can use only max. of 60 telnet , because only 60 application license is available ) , is it possible ? thx.
I understand your mean but actually I also want to control the normal user can only use 60 telnet session , ( even the edp_usr is not logging on , the common user can use only max. of 60 telnet , because only 60 application license is available ) , is it possible ? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2005 05:33 PM
11-15-2005 05:33 PM
Re: control user login
Yes surely you can with /etc/profile file scripting.
--- /etc/profile ---
ps | grep -q 'telnet'
if [[ $? -eq 0 ]]
then
if [[ $(who | wc -l) -ge 60 && ${LOGNAME} != "edp_usr" ]]
then
echo "Telnet session limit is reached. Try after some time"
sleep 1
exit 1
elif [[ $(who | wc -l) -gt 70 && ${LOGNAME} = "edp_usr" ]]
then
echo "Telnet licensed sessions limit is reached - 70. Try later"
sleep 2
exit 1
fi
fi
Save this.
hth.
--- /etc/profile ---
ps | grep -q 'telnet'
if [[ $? -eq 0 ]]
then
if [[ $(who | wc -l) -ge 60 && ${LOGNAME} != "edp_usr" ]]
then
echo "Telnet session limit is reached. Try after some time"
sleep 1
exit 1
elif [[ $(who | wc -l) -gt 70 && ${LOGNAME} = "edp_usr" ]]
then
echo "Telnet licensed sessions limit is reached - 70. Try later"
sleep 2
exit 1
fi
fi
Save this.
hth.
Easy to suggest when don't know about the problem!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP