1832901 Members
2771 Online
110048 Solutions
New Discussion

calling script

 
SOLVED
Go to solution
andi_1
Frequent Advisor

calling script

Hi guys,

Suppose, I have one script that is running as user which needs to call another script that must be run as a root.
Is there a way to do it? Set the Sticky bit???

Thank you!
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: calling script

You can set the setuid bit (4000 octal) to do this and the script must be owned by root.

chmod 4750 my.sh

However, this is a glaring security hole. A better answer is to use sudo or a C wrapper setuid program.
If it ain't broke, I can fix that.
Hemant
New Member

Re: calling script

use "sudo" in your script
andi_1
Frequent Advisor

Re: calling script

Thanks guys,

But I don't have sudo command on my system?

Is it a 3rd party software?
Sachin Patel
Honored Contributor

Re: calling script

sudo or a super.

Sachin
Is photography a hobby or another way to spend $
Deshpande Prashant
Honored Contributor

Re: calling script

HI
You can get sudo at following link

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.2b1/

Thanks.
Prashant Deshpande.
Take it as it comes.
Sachin Patel
Honored Contributor

Re: calling script

You can find super here

http://hpux.cs.utah.edu
and search for super

or
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/super-3.9.7/

Sachin
Is photography a hobby or another way to spend $