- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unix Script
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
12-18-2003 12:59 AM
12-18-2003 12:59 AM
Please give us an scriot to try to do that
Regards
Mario
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 01:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 01:06 AM
12-18-2003 01:06 AM
Re: Unix Script
[ `who | grep $LOGNAME | wc -l` -gt 1 ] && {
echo "You are already logged in"
exit
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 01:07 AM
12-18-2003 01:07 AM
Re: Unix Script
This same question has been asked before, see:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=291677
You'll find your solution there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 01:25 AM
12-18-2003 01:25 AM
Re: Unix Script
Seems an odd thing to do, kill off an old session because you log in again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 01:28 AM
12-18-2003 01:28 AM
Re: Unix Script
if you script to kill the first session off when a new one opens yopu may terminate a program doing some important work far better to stop multiple login rather than killing old logins.
:-) John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 01:42 AM
12-18-2003 01:42 AM
Re: Unix Script
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=303607
(This last thread matches your question better then the previous one... The previous one did the same Mark and Philipe do in their solutions...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 03:26 AM
12-18-2003 03:26 AM
Re: Unix Script
It is simple and can be modified to allow additional connections if you choose.
And it doesn't kill the existing one that may be running a job, only prevents additional connections.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 03:28 AM
12-18-2003 03:28 AM
Re: Unix Script
NUMBER_OF_LOGINS_ALLOWED
This parameter controls the number of logins allowed
per user. This is applicable only for non-root users.
NUMBER_OF_LOGINS_ALLOWED=0 #Any number of logins are
allowed per user.
NUMBER_OF_LOGINS_ALLOWED=N #N number of logins are
allowed per user.
Default value: NUMBER_OF_LOGINS_ALLOWED=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2003 12:10 PM
12-18-2003 12:10 PM
Re: Unix Script
Just a little comment.
the NUMBER_OF_LOGINS_ALLOWED=1 paramenter in the /etc/default/security solutoion proposed will work fine... but not in the CDE environment. CDE will allow multiple logins.
A beter solution is tho restrict the access to users via script as discused.