[X-Unix] Sudo as Another User
Cloyce D. Spradling
cloyce+xunix at headgear.org
Wed Feb 25 07:30:41 PST 2004
On Wed, Feb 25, 2004 at 10:18:21AM -0500, Alex wrote:
: What am I doing wrong? Am I misreading man sudo?
Yep. :) Normally sudo runs whatever command as root. The -u option lets
you change that. So if I (admin user) want to run a command as someone
else (like gretchen), I can just do something like
sudo -u gretchen rm -rf /Users/gretchen
...and the contents of gretchen's home directory will go away, except for files
in directories for which she doesn't have write permission. But there aren't
likely to be too many of those in her home directory, eh? :)
--
Cloyce
More information about the X-Unix
mailing list