- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Multiple Telnet Sessions by one user
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-05-2001 01:05 PM
12-05-2001 01:05 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:09 PM
12-05-2001 01:09 PM
Re: Multiple Telnet Sessions by one user
I don't think there is any easy way to do this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:11 PM
12-05-2001 01:11 PM
Re: Multiple Telnet Sessions by one user
when a user logs in the .profile is run. You can build in a check like this:
TEST=`ps -u `logname` | grep application_name`
if [ "$TEST" -eq "" ]
then
exit 0
fi
Hope this will help,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:11 PM
12-05-2001 01:11 PM
Re: Multiple Telnet Sessions by one user
What a great first name!
Here's some threads to check:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x101372106351d5118fef0090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb16b972194d6d5118ff40090279cd0f9,00.html
I'm sure you can find more using the search feature. And you can also go to search.hp.com where you might get more hits.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:13 PM
12-05-2001 01:13 PM
Re: Multiple Telnet Sessions by one user
Good Luck,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:14 PM
12-05-2001 01:14 PM
Re: Multiple Telnet Sessions by one user
Keep this small script in your /etc/profile
This will not allow more than two telnet sessions.
NO=`who -R |grep $LOGNAME|wc -l`
if [ $NO -ge 2 ]
then
echo "You are not allowed to telnet more than twice"
exit 1
fi
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:18 PM
12-05-2001 01:18 PM
SolutionIP=`who -mR |awk '{FS="(";print $2}'|awk '{FS=")";print $1}'`
NO=`who -R |grep $IP|wc -l`
if [ $NO -ge 2 ]
then
echo "You are not allowed to login more than twice
from $IP"
exit 1
fi
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:19 PM
12-05-2001 01:19 PM
Re: Multiple Telnet Sessions by one user
Since you indicate that every user uses the same login, you will have to track by IPAddress or hostname.
Consider adding a snippet of code to /etc/profile that runs 'last' and looks for a match against 'who -m' and if matched, exits.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:19 PM
12-05-2001 01:19 PM
Re: Multiple Telnet Sessions by one user
He does not want to restrict the userid since all his users use the same user id. He wants to restrict multiple login from a particular ip workstation. Say only two telnet logins from any workstation. If more than two telnet sessions from a single ip, it should block/exit that telnet session.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:25 PM
12-05-2001 01:25 PM
Re: Multiple Telnet Sessions by one user
ok just add :
TEST=`ps -ef | grep application | wc -l`
if [ $TEST -lt n ]
n=number of licenses
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 01:59 PM
12-05-2001 01:59 PM
Re: Multiple Telnet Sessions by one user
Sri has your answer. Personally I like using who -u because you can get the IP with awk using {print $NF}
You may also want to grep the who output for the common login in case some are allowed to login as the common user as well as a normal account.
Darrell