- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Some clarification
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
09-26-2002 12:40 PM
09-26-2002 12:40 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 12:48 PM
09-26-2002 12:48 PM
Re: Some clarification
You might want to post your reply back under your original question so we can follow the discussion under that thread.
Thanks!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 12:48 PM
09-26-2002 12:48 PM
SolutionSourcing a profile to gain environmental variables is a poor choice. The profile is designed, by default, to run in an environment where 'stdin' is a terminal. When a profile is sourced in a crontask the usual result is a cascade of "not a typewriter" messages.
It is far better to place the environmental variables you may need (e.g. for an Oracle environment) in a separate file from the profile and to source the standalone file when needed. Indeed, you can even source the standalone file *within* your profile.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 12:49 PM
09-26-2002 12:49 PM
Re: Some clarification
". /
or you can execute your command in your script by doing
"su -
by using the "-" after the su it will execute the command using that users profile. To make it secure set the permissions of your script to 500 and put it where only root can get to it.
hope this helps
Ray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 01:02 PM
09-26-2002 01:02 PM
Re: Some clarification
We have a lot of Oracle databases and we stop and start them as root, but we like to use the 'su - oracle -d /oracle/do_some_script' method. First, the script is owned and maintained by the Oracle DBAs, so they can change their environment and the script as they need to and they don't have to bother us (as long as the script runs). Also, the script (and the .profile) don't run as root, so an evil user can't put in some code to give themselves root access. From a sys admin standpoint, it is easier for me. If the script blows up and doesn't work, I just go to the DBAs and say, "Hey, fix your script!" :)
This method just follows the school of thinking that the less you do as root, the better off and safer you will be.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 01:06 PM
09-26-2002 01:06 PM
Re: Some clarification
'su - oracle -c /oracle/some_script'
The -d was a typo, and it probably does something bad and ugly to the su command.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 01:39 PM
09-26-2002 01:39 PM
Re: Some clarification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2002 01:48 PM
09-26-2002 01:48 PM
Re: Some clarification
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x09e0a848deccd61190050090279cd0f9,00.html
...JRF...