Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to use scsudo to run a number of defined commands to stop and start processes on a UNIX host. The issue I am experiencing is that scsudo does not seem to like the use of positional parameters when script is called with scsudo from command configuration file.

I have been tasked with implementing scsudo to reduce the number of functional access requests to stop and start processes and other defined commands, and the administrative overhead associated with this.

Here is an example:

scsudo - <functional_id> "/opt/scripts/Start_Process_script.sh parameter1 parameter2 parameter3"
Password:
Reason:
execvp: No such file or directory

It looks like the scsudo configuration file does not seem to handle the parameters when calling script and so fails to find script it has been asked to run.

I have placed parentheses around command including parameters but this still has not resolved the problem?

I have searched the web and Stack Exchange thoroughly but have been unable to return much if anything related to scsudo in terms of guides or knowledge base for the use of scsudo.

I would be very grateful for your assistant on this matter.

share|improve this question
1  
I'm curious - Google is not showing me much about scsudo; can you say anything about where it comes from? –  Jonathan Leffler Dec 22 '11 at 19:36
    
@Jonathan Leffler Scsudo works in a simlar way to sudo providing user with functional account access for a specified group of users on a specified number of hosts to run a predefined number of commands. User, Host and Commands groups are created which contains who can run what commands on which hosts. Scsudo also provides an audit trail containing details of what commands were run, by whom and on which host. I have a better explanation at work, so may update this on my return. –  theirishkiwi Dec 23 '11 at 10:21
add comment

1 Answer

It's trivial when you know the trick:

scsudo - <functional_id> sh -c "/opt/scripts/Start_Process_script.sh parameter1 parameter2 parameter3"

You might also be able to use:

scsudo - <functional_id> /opt/scripts/Start_Process_script.sh parameter1 parameter2 parameter3

if the script starts with an appropriate shebang (#!/bin/sh or #!/bin/bash or whatever).

As you wrote it, the scsudo command is looking to execute a program in /opt/scripts called "Start_Process_script.sh parameter1 parameter2 parameter3" (complete with embedded spaces) and isn't finding it, hence the error.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.