[sudo-users] getting a syntax error when I run a scritp via sudo

Robert Morris Robert.Morris at unionbank.com
Fri Jun 5 09:40:45 MDT 2015

Thank you 
That worked.

I will put that in my bag of tricks.

Robert E. Morris

-----Original Message-----
From: Todd C. Miller [mailto:Todd.Miller at courtesan.com] 
Sent: Friday, June 05, 2015 7:18 AM
To: Robert Morris
Cc: 'sudo-users at sudo.ws'
Subject: Re: [sudo-users] getting a syntax error when I run a scritp via sudo

You need to put the interpreter as the first line of the script or it will be run via /bin/sh.  It sounds like you really want it to run via ksh.  If so, adding:


to the top of the script should fix it.

 - todd

This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.

More information about the sudo-users mailing list