- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Login Limiter
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
08-08-2000 11:25 AM
08-08-2000 11:25 AM
Login Limiter
--Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2000 11:44 AM
08-08-2000 11:44 AM
Re: Login Limiter
It will be a bit of a maintenance issue as each new user will have to be added to this list. And since the user can change their shell without root assistance (chsh), you will have to add this limiting code to profiles that match other shell startup proceses.
An alternative might be to scan ps and look for excessive nunbers of processes for a given user and report the results. While you could arbitrarily kill old processes that exceed a limit, it may create a politically awkward situation.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2000 11:57 AM
08-08-2000 11:57 AM
Re: Login Limiter
Depending on the groups membership, would check to see if they have a login on the system. If they do, would not them into the second session.
Being this was based upon the group membership, another group that would not have this restriction was using another profile.
This same logic can be applied to the /etc/profile and the users group membership. There was a group that did not have the multiple login restrictions. If the need came up for a restricted user to have multiple logins, it was just a matter of adding to the other group as well and they could have multiple logins.
Sorry I don't have the syntax.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2000 12:01 PM
08-08-2000 12:01 PM
Re: Login Limiter
The users would source a common profile that we had located elsewhere.
The script would do a grget command to find the group memberships for the user. If the user was in a particular group that was specified in the script, multiple logins would be allowed. If they were not in the group, only one login session. This allowed for relatively easy maintenance because if the user needed multiple logins, just as easy as adding to the specified group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2000 01:57 PM
08-08-2000 01:57 PM
Re: Login Limiter
trap exit 1 2 3 15
Me=`who am i | cut -f1 -d' '`
Cnt=`who -uH | cut -f1 -d' ' | grep "${Me}" | wc -l`
echo "Current active sessions for ${Me} = ${Cnt}."; sleep 2
if [ "${Cnt}" -gt 3 ]
then
echo "nnWarning: Too many concurrent login sessions active!07"
echo " Session terminated!07nn"
sleep 5
exit
fi
unset Me Cnt
echo " "
banner "Hi" $LOGNAME ; sleep 3
echo " "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2000 02:03 PM
08-08-2000 02:03 PM
Re: Login Limiter
AdminGroup=666
SessionLimit=2
UserID=`id -un`
UserSessions=`who | grep -c ${UserID}`
if [ `grget -g ${AdminGroup} | grep -c ${UserID}` -ne 1 ]
then
if [ ${UserSessions} -ge ${SessionLimit} ]
then
echo " Session limit reached. Further logins not permitted."
exit 1
fi
fi
--Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2000 03:18 PM
08-08-2000 03:18 PM
Re: Login Limiter
My only comment is if the users are making telnet connections I added a sleep 5 before the exit to give the user a chance to read the message before closing the connection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2000 07:39 AM
08-09-2000 07:39 AM
Re: Login Limiter
--Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2000 07:44 AM
08-09-2000 07:44 AM
Re: Login Limiter
Other protocols should have no trouble. They come up in the emulator, get the login prompt, go through the profile, and they should be set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2000 07:55 AM
08-09-2000 07:55 AM
Re: Login Limiter
This might be trouble.
--Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2000 08:05 AM
08-09-2000 08:05 AM