"su: must be run from a terminal" How best for root to run command as user
I have a script that runs as root and needs to execute a command as another user. However, it seems that newer versions of su won't let me do that. I get the message...
"su: must be run from a terminal"
I can understand the security issue of allowing a normal user to su when not in a terminal, but why is root blocked from running as a normal user??? Is there any reason why there is not an excemption for root?
The command I would like to run is to check Zimbra status for nagios/nrpe.
su - zimbra -c "zmcontrol status"
Is there any workaround to enable root to execute the above command?
I've just realised that the script wasn't being run as root. So it obviously wouldn't work!
Good to see you figured out what was wrong and added this info to your thread.
Ignoring it by taking this of the zero reply list......
|All times are GMT -5. The time now is 09:50 PM.|