- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Session limitations and who substitutions
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
09-26-2003 04:02 AM
09-26-2003 04:02 AM
Any idea why HP-UX isn't shutting these processes down? Each user is allowed a maximum of 4 sessions. The customer uses a script to monitor session limits for each user. The scripts uses the WHO command to report sessions for users. The problem is sometimes the output from the who command is not accurate because the /etc/utmp file can get corrupted for the reasons stated at the beginning of this message. The customer realizes that HP cannot control this, there questions are :
1) Is there an alternative to "who" to determine the number of sessions a user has active?
2) A way to limit Unix user logons?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 04:04 AM
09-26-2003 04:04 AM
Re: Session limitations and who substitutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 04:09 AM
09-26-2003 04:09 AM
Re: Session limitations and who substitutions
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 11:40 AM
09-26-2003 11:40 AM
SolutionTypically a telnet session will always run through /etc/profile and this is a good place to check for logins. As mentioned, who depends on /etc/utmp which can get corrupted so a better way is to ask ps to search for login shells (assuming your users are using telnet or ssh) for a specific user. When each user logs in, /etc/profile will have the variable LOGNAME set so:
USERLOGINS=$(UNIX95= ps -u$LOGNAME -o comm | grep "-" | wc -l)
Now $USERLOGINS will be the number of login shells. To see how this works, separate the lines:
UNIX95= ps -u$LOGNAME -o comm
UNIX95= ps -u$LOGNAME -o comm | grep "-"
You can substitute any user name for testing. In /etc/profile, once the code is working, if the user has $USERLOGINS equal to 4 or more, echo an error message and exit. This is a lot more reliable (and much less overhead) than using who.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2003 04:32 PM
09-27-2003 04:32 PM