The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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 04:53 PM
running X-11 programs as root Allasso UNIX for Advanced & Expert Users 8 12-28-2007 03:22 PM
Running out of Space (Root) scorpiyanz UNIX for Advanced & Expert Users 0 08-19-2005 10:22 AM
Running a command or script as root rm-r Shell Programming and Scripting 3 05-27-2005 08:58 AM
Run non-root script as root with non-root environment bubba112557 UNIX for Dummies Questions & Answers 2 12-03-2004 12:39 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-01-2002
kymberm kymberm is offline
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?
  #2 (permalink)  
Old 11-02-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
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 (permalink)  
Old 11-04-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
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.


Last edited by Kelam_Magnus; 11-04-2002 at 05:47 PM..
  #4 (permalink)  
Old 11-05-2002
kymberm kymberm is offline
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 (permalink)  
Old 11-05-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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 (permalink)  
Old 11-12-2002
kymberm kymberm is offline
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 (permalink)  
Old 11-12-2002
RTM's Avatar
RTM RTM is offline Forum Advisor  
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0