- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: startup (rc) script for non root user
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
05-17-2000 10:48 AM
05-17-2000 10:48 AM
startup (rc) script for non root user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2000 12:28 PM
05-17-2000 12:28 PM
Re: startup (rc) script for non root user
If the process itself had the set-uid set and was owned by user but then run by root, then the process would have a real-uid of root but an effective-uid of user.
But the su command uses the setuid(2) system call set set the uid. So this will do what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2000 12:55 PM
05-17-2000 12:55 PM
Re: startup (rc) script for non root user
What I would like, and I am afraid this is going to sound confusing, is for a startup script to call a user process. If the user process were to do a "who am i" (with spaces) the return would not be root but would be the user id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2000 01:23 PM
05-17-2000 01:23 PM
Re: startup (rc) script for non root user
In the case of processes that are run in the start-up scripts, there is no attached terminal. "who am i" should fail if things are working correctly. A similiar result would occur if you did "who am i" via remsh.
There is a "whoami" which just looks at the process' uid. But scripts that run via the start-up scripts should simply not be using "who am i" or any other terminal related commands.
We use "su - user" a lot in our start-up scripts and they all work fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2000 04:16 PM
05-17-2000 04:16 PM
Re: startup (rc) script for non root user
su - oracle -c script
in you rc files it should run the script as the effective user i.e oracle