HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: su - user -c < executable script/command >
Operating System - HP-UX
1834185
Members
2828
Online
110064
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
12-03-2003 12:29 AM
12-03-2003 12:29 AM
Hi,
EAI processes in my system used to start with root owner at startup. I want the same processes to start under prodeai2 user rather than with root owner. What way I shall use to make it working using same startup script. Please reply,
Regards
Prashant
EAI processes in my system used to start with root owner at startup. I want the same processes to start under prodeai2 user rather than with root owner. What way I shall use to make it working using same startup script. Please reply,
Regards
Prashant
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 12:35 AM
12-03-2003 12:35 AM
Solution
in your startup script something like (for start, adapt for stop) :
'start') /usr/bin/su - prodeai2 -c "//bin/ start" >>
/var/tmp/prodeai2.log 2>&1
This is an example.
You may want to add some test before you run the start command
Regards,
Jean-Luc
'start') /usr/bin/su - prodeai2 -c "/
/var/tmp/prodeai2.log 2>&1
This is an example.
You may want to add some test before you run the start command
Regards,
Jean-Luc
fiat lux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 12:38 AM
12-03-2003 12:38 AM
Re: su - user -c < executable script/command >
You've got the right idea in your subject line:-
su prodeai2 -c 'command args'
is the way to go.
Note that su - is not recommended because the profile scripts for that user get run and programs like stty can give you problems.
If you need to run the .profile in order to set up an environment (exported variables PATH etc) then write a suitable app_env script that .profile and any other script can run as a subshell.
Regards,
John
su prodeai2 -c 'command args'
is the way to go.
Note that su -
If you need to run the .profile in order to set up an environment (exported variables PATH etc) then write a suitable app_env script that .profile and any other script can run as a subshell.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 10:59 PM
12-03-2003 10:59 PM
Re: su - user -c < executable script/command >
Thanks for inputs provided. I have done it.
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