[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As well as starting shells, Become can run single commands. This can be useful in two ways:
To run a command as another user, say:
become user command [argument…] |
If the request is granted, Become runs command, passing it any arguments following the command name. Become doesn't run a shell, so there's no extra escaping which needs to be done.
If you really want to run a shell command as another user, you can use the
-c
option:
become user -c shell-command |
This is exactly equivalent to
become user /bin/sh -c shell-command |
in every way. In particular, you must have permission to run `/bin/sh' as user for it to work: Become doesn't attempt to interpret the shell command in any way. Also note that Become always uses the Bourne shell, regardless of your current shell preference, or user's default shell. (This is done to provide a stable programming interface which works irrespective of changes to the shared account's configuration.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Mark Wooding on March, 14 2006 using texi2html 1.76.