Execute commands as another user

Feb 20, '03 10:14:00AM

Contributed by: God of Muffins

In order to execute a command via another user, without knowing their password, you can use the "su" command to log into root and then their account.

% su - [enter root password]
% su bob
[robg adds: Further proof that root really can do everything ... and why you should be quite careful with it. Any comments from the UNIX experts?]

Comments (23)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030216233109863