The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
running sshd server from home directory without root access sayeo SUN Solaris 0 03-13-2008 01:53 PM
running X-11 programs as root Allasso UNIX for Advanced & Expert Users 8 12-28-2007 12:22 PM
Running out of Space (Root) scorpiyanz UNIX for Advanced & Expert Users 0 08-19-2005 07:22 AM
Running a command or script as root rm-r Shell Programming and Scripting 3 05-27-2005 05:58 AM
Run non-root script as root with non-root environment bubba112557 UNIX for Dummies Questions & Answers 2 12-02-2004 09:39 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-01-2002
Registered User
 

Join Date: Mar 2002
Location: Texas
Posts: 120
running a scr in rc3.d not as root, can i?

I want to run one of my startup script S21mystartup.scr in rc3.d directory so it boots with the system, however, can i do this as other than root? Don't want it to run as root. how can i get this to go as another user?
Forum Sponsor
  #2  
Old 11-02-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
You may be able to call the actual executables within the script using "su". You can specify which user to run each executable.
  #3  
Old 11-04-2002
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
I am somewhat curious as to what advantage you would gain from this configuration. Are you wanting to be able to restart the script after the box is up in case of trouble?

From what I can tell on my HPUX system, my /sbin/rc3.d directory has read and exe for all of the startup scripts there.

Now that I look closer, I believe that you would actually exe the script from/sbin/init.d/myscript, and not from startup script directory /sbin/rc3.d/myscript. You can use the myscript stop; myscript start functionality from /sbin/init.d. Most likely, you should already be able to exe the scripts from there if the permissions are at least 755.

However, I don't see any advantages/disadvantages of having it owned by a non-root user. I think it is entirely possible that you can do this, but I don't see any gain by this configuration.

Maybe you can elaborate on your situation.

__________________
My brain is your brain

Last edited by Kelam_Magnus; 11-04-2002 at 02:47 PM.
  #4  
Old 11-05-2002
Registered User
 

Join Date: Mar 2002
Location: Texas
Posts: 120
We have a configuration tool, and I've been told i can't bring up the license manager or that database in the initial startup scripts as root since it won't allow others to modify files checked in and out, i haven't foudn this to be true yet, but one of our other sites says this happens. So was wondering if i could set it to start up as another user. so could i set up my startup script like this:
start:

su otheruser
myscript



:
end
  #5  
Old 11-05-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
What you need to do to write a script to be run to bring up the tool. Then the startup script will do:
su whoever -c /path/to/true.startup.script
  #6  
Old 11-12-2002
Registered User
 

Join Date: Mar 2002
Location: Texas
Posts: 120
Worked!

changing the script to say su -c .... worked! Thanks, so simple, and I didn't even think about it, thanks for the help!
  #7  
Old 11-12-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
As far as the question of advantages/disadvantages of having a process started up as non-root, many times the different SQL processes start as either root or as their own user (Sybase or Oracle). The Sybase folks (half of them) know that they don't need root to run and set up their scripts with a su to the sybase user. Oracle folks almost always do this. Our other Sybase folks like to run Sybase from root - then they need root to work on their servers. This was started because someone many years ago didn't care about security - just wanted to get things working. Although it's been proven and implemented on some servers to remove the root/Sybase connection, getting it pushed across all servers is a hassle.

There is no disadvantage to my knowledge but the advantage is not having another process that could be hacked and leave someone with root on a server.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0