[sudo-users] sudo and shell scripts.

Gary.Haden at saga.co.uk Gary.Haden at saga.co.uk
Fri Apr 12 01:13:40 MDT 2013


Hi,

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:
`DBUSERNAME=$'
unexpected

Line 61 is DBUSERNAME=$(echo $DBUSERNAME | tr '[a-z]' '[A-Z]')

Is sudo ignoring the (echo $DBUSERNAME | tr '[a-z]' '[A-Z]') part of the
line and only reading DBUSERNAME=$? Do brackets ( ) mean something
different in sudo?

Any help would be great.

Thanks

Gary.

Please consider the environment before printing this email
The opinions expressed in this e-mail are those of the individual and not necessarily the company. This e-mail and attachment[s] are confidential to the sender and are solely for use by the intended recipient.

Saga Services Limited: Company Registration No. 732602
Saga Publishing Limited: Company Registration No. 2152564
The above companies are wholly owned subsidiaries of Saga Group Limited.

Saga Holidays is a registered trading name of Acromas Holidays Limited: Company Registration No. 2174052
Saga Shipping is a registered trading name of Acromas Shipping Limited: Company Registration No. 3267858
Saga Personal Finance is a registered trading name of Acromas Financial Services Limited: Company Registration No. 3023493

Saga Group Limited: Company Registration No. 638891
All companies registered at: Enbrook Park, Sandgate, Folkestone, Kent CT20 3SE
Saga Charitable Trust is a UK registered charity No. 291991

Saga Services Limited is authorised and regulated by the Financial Services Authority.
Acromas Financial Services Limited is authorised and regulated by the Financial Services Authority.
Acromas Holidays Limited is an appointed representative of Automobile Association Insurance Services Limited which is authorised and regulated by the Financial Services Authority.
Acromas Insurance Company Limited is authorised by the Financial Services Commission, Gibraltar.

This e-mail and attachment[s] has been scanned for the presence of computer viruses. Saga accept no responsibility for computer viruses once this e-mail has been transmitted.


More information about the sudo-users mailing list