- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Environment variable help
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
тАО04-22-2009 02:25 AM
тАО04-22-2009 02:25 AM
We are having the hp-ux server of version 11.11 and sap application on it.
(1)I have set an Environmental variable тАЬMQSERVER тАЬglobally (/etc/profile), I am able to see variable using env command also echo $MQAERVER showing the path correctly.
(2)But user (iface ) not able to see env variable MQSERVER by env command and by using echo $x even after login through session and also tried with different shell ksh/csh.
(3) I have made the entry of env variable with export command in userтАЩs .profile and tried with new session but still no result.
Please suggest what could be the solution in this case.
Thank you kindly.
Regards,
Subodh.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 02:30 AM
тАО04-22-2009 02:30 AM
Re: Environment variable help
are there any other scripts executed from the user's .profile file ? Maybe something that is executed after the .profile clears the user's environment.
J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 02:35 AM
тАО04-22-2009 02:35 AM
Re: Environment variable help
As root:
echo $MQSERVER
awk -F: ' $1=="iface" { print $7 } ' /etc/passwd
su - iface -c 'echo $MQSERVER'
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 02:48 AM
тАО04-22-2009 02:48 AM
Re: Environment variable help
>>I am able to see variable using env command also echo $MQSERVER showing the path correctly<<
If you are able to see the env variable, and you are a normal user, then iface user also should be able to do unless or until if something is overriding this value in his user profile. check the user profile
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 02:52 AM
тАО04-22-2009 02:52 AM
Re: Environment variable help
changes to his "~/.profile" or "/etc/profile"
may have little effect.
Adding an "echo" command after the command(s)
used to set the variable might tell you if
anyone is actually running the command(s).
> ok prove it [...]
Or even show your actual changes, instead of
trying to describe (vaguely) what you did.
Real evidence is often more helpful than
vague descriptions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 11:07 PM
тАО04-22-2009 11:07 PM
SolutionSetting variables in /etc/profile doesn't help if the user uses C shell.
Please provide output of:
#grep iface /etc/passwd
Try setting the variable in the .profile or (if C shell) .cshrc files in the $HOME directory of user iface.
Remember that the syntax of csh profile is different from the sh profile syntax.
Regards,
Bart