LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 08-18-2014, 12:06 AM   #1
linux_neophyte
LQ Newbie
 
Registered: Jan 2009
Posts: 15

Rep: Reputation: 0
starting scripts with non root user.


Hi Team,

Iam trying to execute few scripts Initial scripts runs with root then it calls its few subscripts to be run as non-root user, but cannnot able to do so , the script is starting by root user itself can somebody please help on this.

Quote:
Content of Initial script which calls other script to run as non root user

#################start managed server as oracle

/bin/su oracle -c 01startoidservers.sh

sleep 10


Content of the script called by Initial script to be run as non root user




Quote:
#######Starting OID service###############

cd /scratch/app/product/fmw/asinst_1/bin
./opmnctl startall

sleep 120

./opmnctl status -l > /tmp/opmnstatus_start_status.log

#######starting OID Admin SERVER#####################

cd /scratch/app/product/fmw/user_projects/domains/IDMDomain/bin

nohup ./startWebLogic.sh &

sleep 200

#######starting OID Managed SERVERs#####################

nohup ./startManagedWebLogic.sh wls_ods1 > wls_ods11.log &

sleep 60

exit
 
Old 08-18-2014, 12:16 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
please tell us a few words about the error message you got or why do you think there is a problem at all? What does "cannnot able to do so" really mean?
 
Old 08-18-2014, 12:27 AM   #3
linux_neophyte
LQ Newbie
 
Registered: Jan 2009
Posts: 15

Original Poster
Rep: Reputation: 0
reply

There is no error at all thrown.

The script however expects that the process should be run as user oracle.

However the process are run by root user.


Hope this helps you to understand.

Thanks.
 
Old 08-18-2014, 12:47 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
/bin/su oracle -c 01startoidservers.sh
should change the user id (to oracle). If it can't do that it should drop an error message.
just put set -xv at the beginning of your initial script to see what's happening (that will not solve this issue, just print some additional info)
 
  


Reply

Tags
su



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xorg not starting under non-root user doughyi8u Linux - Newbie 3 09-07-2013 04:41 PM
samba 3.5.9: logon scripts are not working under non root user MarvinFS Linux - Networking 1 08-06-2011 02:26 AM
Starting scripts as non-root rabalder321 Linux - Newbie 4 12-09-2005 08:08 AM
Starting a service as non root user? dee3lmo Linux - General 2 07-30-2004 07:37 PM
X server not starting as non root user Draylath Linux - Newbie 16 06-25-2004 02:02 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration