- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- startup app's with a different user/owner from roo...
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
02-05-2003 01:48 PM
02-05-2003 01:48 PM
I need to set application to start on startup
So I need to put it in /sbin/init.d and a link /sbin/rc#.d/ .
But what if I need it to start with a different user/owner from root?
Where do I specify it?
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 01:51 PM
02-05-2003 01:51 PM
Re: startup app's with a different user/owner from root
I.E. I use a different ID to start apache than root.
su - httpd -c /usr/local/sbin/run_apache.sh
The - runs the login scripts (.profile, .login) for the user "httpd". The -c option is the command I run as the user.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 01:53 PM
02-05-2003 01:53 PM
SolutionWrite a script that will start your application. call it say /home/user/bin/app.sh.
Create your startup and shutdown script for /sbin/init.d. Inside of it in the start portion do the following
su - user -c /home/user/bin/app.sh
You can write two scripts appstart.sh and appstop.sh and call them in start and stop portions of init script or, write one script that takes start and stop as the arguments and call them from init script.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 01:54 PM
02-05-2003 01:54 PM
Re: startup app's with a different user/owner from root
This is the syntax for root to run a command as another user:
# su - user_id /full_path_name/command
If the command requires some arguments, then use:
# su - user_id "/full_path_name/command arguments"
You can "man su" for more info.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 01:56 PM
02-05-2003 01:56 PM
Re: startup app's with a different user/owner from root
# su - user_id -c "/full..."
Hai