[sudo-users] sudo and shell scripts.
vcizek at suse.cz
Fri Apr 12 04:22:35 MDT 2013
* Dne Pátek 12. duben 2013, 09:13:40 [CEST] Gary.Haden at saga.co.uk napsal:
> We have a script that runs as root fine but when we run as another user and
> - sudo -u root <script> we get -
> /saga/bin/env_create/createTIAUser.shl: syntax error at line 61:
> Line 61 is DBUSERNAME=$(echo $DBUSERNAME | tr '[a-z]' '[A-Z]')
Doesn't have the root user a different shell?
For example, bourne shell doesn't support $(), I think.
Do you have a shebang at the beginning of your script?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the sudo-users