how to run the script as root with the help of sudo

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

how to run the script as root with the help of sudo

Post by mikva2012 »

Hi All,
When i run the sudo -l command i got the following o/p below.
right now my query is , how to run the following commad as root with the help of sudo command.
am not able to switch to the root user.
sudo su
is giving error message not added to the /usr/bin/su
i think this is the right way to run the below commaand

sudo /apps/IBM/InformationServer/Server/DSEngine/bin/uv -admin -stop

sudo -l
User khanirfa may run the following commands on this host:
(root) NOPASSWD: /apps/IBM/InformationServer/Server/DSEngine/bin/uv
(root) NOPASSWD: /apps/IBM/InformationServer/ASBNode/bin/NodeAgents.sh
(root) NOPASSWD: /apps/IBM/WebSphere/AppServer/profiles/default/bin/stopServer.sh
(root) NOPASSWD: /apps/IBM/WebSphere/AppServer/profiles/default/bin/startServer.sh
(root) NOPASSWD: /apps/IBM/InformationServer/Server/DSEngine/dsenv
(root) NOPASSWD: /apps/IBM/InformationServer/ASBServer/bin/MetadataServer.sh start
(root) NOPASSWD: /apps/IBM/InformationServer/ASBServer/bin/MetadataServer.sh stop
(root) NOPASSWD: /apps/IBM/InformationServer/ASBServer/bin/MetadataServer.sh run

please provide your valuable suggestion
Irfan.
sabarimuthu0728
Participant
Posts: 6
Joined: Tue Nov 06, 2012 6:34 pm

Re: how to run the script as root with the help of sudo

Post by sabarimuthu0728 »

Try this....

runsudo <command>
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Post by mikva2012 »

this is the only right way

sudo /apps/IBM/InformationServer/Server/DSEngine/bin/uv -admin -stop
Irfan.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your syntax was fine. What was the actual resolution?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply