- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Delegate start/stop services to regular 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
10-08-2003 10:48 AM
10-08-2003 10:48 AM
We're running Oracle 9iAS on two nodes (application server and database server). I would like to let a regular user start/stop services on the application server.
To do this, the user must be oracle and group dba. I did my homework and I tried to accomplish this via SUID but unfortunately that didn't work. First of all, let me tell you that SUID works for scripts (many people think that it only works for binary executables). The problem I had was that everytime the script runs: the UID and GID remains as that of the regular user (and not oracle:dba). I placed the "id" command on the script and then executed the script as "jose". The output of the id command was:
uid=107(jose) gid=20(users) euid=103(oracle) egid=103(dba)
And then when it was the section to run the oracle commands (dcmctl in this case) I had a bunch of erros. Somehow, these oracle programs (dcm etc...) will look for UID and GID (besides EUID AND EGID).
I even created a c program that calls the script (and the I used SUID and GUID for this program) but I had the same results.
So, my question is...is there a way a regular user can run a script as another user (even with UID and GID as that of the other user) ..not just EUID and EGID?
Can SUDO accomplish this?
Thanks,
Jorge
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2003 11:00 AM
10-08-2003 11:00 AM
SolutionWhat you could do is write a script that does something like:
#/usr/bin/sh
su - oracle -c "run_the_start_script"
Set the permissions on the above script so it is just executable by root. Then set up sudo so that the user can then run that script, which will then su to oracle and run your startup script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2003 11:13 AM
10-08-2003 11:13 AM
Re: Delegate start/stop services to regular user
I thought about these 2 possible work-arounds:
1> use sudo...but then I thought exactlhy what you mention: sudo is for regular-users to run programs as root (not my case..since I want user to user interaction) .... option 1 discarded
2> create a script using the su line you mention..but then I thought: this user won't be root so the "su" command is going to prompt for a password...then I thought about the "expect" command...and also thought about not liking to hard-code the oracle password in the script..so....option 2 discarded
and now you came with the best of both worlds! THANKS AGAIN!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 12:29 AM
10-09-2003 12:29 AM
Re: Delegate start/stop services to regular user
Sudo is probably your best option as Patrick has already suggested.
Sudo represents only one solution and even though it is free there is another more friendly product call UPM (Unix Privilege Manager) which is distributed by PASSGO (aka Symantec offshoot).
Have a look at the product information just for a comparison :-
http://www.passgo.com/products/upm/index.htm
Hope this helps.
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 01:19 AM
10-09-2003 01:19 AM
Re: Delegate start/stop services to regular user
/tmp /var /home
and of course, all Oracle mountpoints for data, index, logs, etc.
sudo is the preferred choice because it logs all activities and you control exactly what each user can do (to the point of specific programs and evemn restricted parameters).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2003 01:30 AM
10-09-2003 01:30 AM
Re: Delegate start/stop services to regular user
I've user a licensed software called powerbroker which is quite good. You can download a evauluation copy from their website.
http://www.symark.com
Hope this helps.
Regds
Sanjay