The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
sudo command is not working inside a script when placed in cron
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
sudo command is not working inside a script when placed in cron
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
02-11-2009
vbe
Moderator
Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,576
Your sudo line should be something like:
Code:
sudo -u <user> -c "/etc/init.d/init.sss start >> /tmp/output_sss "
But you would have to look the mans, the syntax varies depending of the version...
vbe
View Public Profile
Find all posts by vbe
Find vbe's past nominations received
Find vbe's present nominations given