HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Allow user a single concurrent login
Operating System - HP-UX
1833784
Members
4513
Online
110063
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
Go to solution
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
05-10-2004 11:10 PM
05-10-2004 11:10 PM
I want to restrict a user to only be able to have a single concurrent login by telnet. Is there a system setting which will set the number of concurrent logins, or will I have to change the users login script to check if they are already logged on?
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:17 PM
05-10-2004 11:17 PM
Solution
What OS you are running? Depending on that you few options here.
IOrrespective of what OS your ar erunning you can put some code in /etc/profile to take care of this. Something as follows.
logname=${LOGNAME}
count = `who -u|grep "${logname}"`
if [ $count -gt "1" ]
echo "Only one login per user allowed"
exit 0
fi
If you are runninf 11.0 or upwards, you can put following entry in /etc/default/security file. (This applies only to non-root users.
NUMBER_OF_LOGINS_ALLOWED=1
Anil
IOrrespective of what OS your ar erunning you can put some code in /etc/profile to take care of this. Something as follows.
logname=${LOGNAME}
count = `who -u|grep "${logname}"`
if [ $count -gt "1" ]
echo "Only one login per user allowed"
exit 0
fi
If you are runninf 11.0 or upwards, you can put following entry in /etc/default/security file. (This applies only to non-root users.
NUMBER_OF_LOGINS_ALLOWED=1
Anil
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 03:54 AM
05-11-2004 03:54 AM
Re: Allow user a single concurrent login
Hi,
Additional hint:
if [ $(last $LOGNAME|grep "logged in" 1>/dev/null) -gt 1 ]; then
exit
else
:
fi
Just take into account that this and previous tests don't work if user logs in via
su - username
Good luck
Additional hint:
if [ $(last $LOGNAME|grep "logged in" 1>/dev/null) -gt 1 ]; then
exit
else
:
fi
Just take into account that this and previous tests don't work if user logs in via
su - username
Good luck
Entities are not to be multiplied beyond necessity - RTFM
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