Using redirection in commands
Britton Bob
Britton_Bob at prc.com
Mon Apr 16 11:02:11 EDT 2001
I have a log file which I want owned by root and a script that can be run by
any user. I want to use sudo to allow the script (run by the user) to echo
status messages to the log file (owned by root) without a password. How do
I set this up? I tried putting the redirection (>>) on the command line but
that's interpreted by the shell before it gets to sudo. I tried putting the
redirection in the sudoers file, but I either got a syntax error when I
tried to exit visudo, or I was prompted for the password when the script ran
sudo.
Bob B.
More information about the sudo-users
mailing list