HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Check the server login
Operating System - HP-UX
1832617
Members
2946
Online
110043
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
04-21-2005 02:48 AM
04-21-2005 02:48 AM
We have one database that run on the hp unix server , many users will login to the system from two different locations eg. location A and location B ( location B is oversea ) , because the users at location B is through the VPN to connect to the database so it need to use a specific TERM setting ( eg. TERM=vt110 ) , the location A will use TERM=vt220 . Both locations use the same script to connect to the database .
I want to ask is it possible the system can check if the user is from location A , it will connect the database with TERM=vt220 , and if the user is from location B , it will connect the database with TERM=vt110 ? thx in advance.
I want to ask is it possible the system can check if the user is from location A , it will connect the database with TERM=vt220 , and if the user is from location B , it will connect the database with TERM=vt110 ? thx in advance.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 02:52 AM
04-21-2005 02:52 AM
Solution
This command:
DISPLAY=$(who -m -u | awk '{print $8}')
The who part routed to awk(inside parens) will let you see exactly where the user logged in from and take appropriate action.
I have it in /etc/profile
I'm using to set X terminal display, but the information is quite useful.
SEP
DISPLAY=$(who -m -u | awk '{print $8}')
The who part routed to awk(inside parens) will let you see exactly where the user logged in from and take appropriate action.
I have it in /etc/profile
I'm using to set X terminal display, but the information is quite useful.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 03:28 AM
04-21-2005 03:28 AM
Re: Check the server login
This is very much possible.
Something like follows in /etc/profile.
ip_address=$(who -um|awk '{print $NF}')
if [ ${ip} = "vpn_ip" ]
then
export TERM=vt100
elseif
if [ 4{ip} = "other_ip" ]
then
export TERM=vt220
fi
fi
Anil
Something like follows in /etc/profile.
ip_address=$(who -um|awk '{print $NF}')
if [ ${ip} = "vpn_ip" ]
then
export TERM=vt100
elseif
if [ 4{ip} = "other_ip" ]
then
export TERM=vt220
fi
fi
Anil
There is no substitute to HARDWORK
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