- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- different environment setting Logging locally and ...
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
Discussions
Discussions
Forums
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
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
тАО10-25-2005 10:33 PM
тАО10-25-2005 10:33 PM
If I want the same user to have different environment setting when they login locally and remotely, how can I acheive this?
Best regards
Henry
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2005 10:48 PM
тАО10-25-2005 10:48 PM
SolutionIf so, here one way you could do it in their .profile...
ENV_REMOTE=/path/.shrc_remote
ENV_LOCAL=/path/.shrc_local
if [ "${SSH_TTY}X" != "X" ];then
ENV=$ENV_LOCAL
else
ENV=$ENV_REMOTE
fi
Hope this helps,
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2005 12:01 AM
тАО10-26-2005 12:01 AM
Re: different environment setting Logging locally and remotely
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2005 02:54 AM
тАО10-26-2005 02:54 AM
Re: different environment setting Logging locally and remotely
e.g.
# grep ^PermitUserEnv /opt/ssh/etc/sshd_config
PermitUserEnvironment yes
Then you can either place the setting of environment variables in the leading option fields of the user's public key (repeated environment option possible)
# grep grothe .ssh/authorized_keys|head -1|cut -c1-94
environment="DAISY_USER=grothe",environment="LANG=C",environment="EXINIT=set ai ic sw=4 ts=4"
or you could create a file named $HOME/.ssh/environment
where you place the usual variable assignments
But please read the warning note in man sshd_config about possible implications of permitting users' environments (especially in respect to preloaded shared libs).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2005 01:01 PM
тАО10-26-2005 01:01 PM
Re: different environment setting Logging locally and remotely
But is this applicable for all unix platform light SOlaris or Linux? My system is interlink with these.
Regards
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2005 07:27 PM
тАО10-26-2005 07:27 PM
Re: different environment setting Logging locally and remotely
(so no difference betw. hpux and solaris)