rootsh man page

rootsh — a logging wrapper for shells

Synopsis

rootsh [OPTION]... [--] [COMMANDS]

Description

Start a shell with logging of input/output. Rootsh must be started via sudo if you want to become root. It does not raise your privileges on it's own. You can run rootsh as a standalone application if you only want to log your own user's session. If you call rootsh with additional commands, these will be passed to the shell.

-i, --initial

Make the shell a login shell

-u, --user=USER

Run the shell as a non-root user

-f, --logfile=FILE

Name of the file you want to write the logs (standalone only)

-d, --logdir=DIR

Directory where you want your logfile written (standalone only)

--no-logfile

Switch off logging to a file (standalone only)

--no-syslog

Switch off logging to syslog (standalone only)

-h, --help

Display this help and exit

-V, --version

Output version and capability information and exit

--

Stop scanning for command line options. Everything found after -- will be passed to the shell with -c

No parameters mean start a rootshell

Examples

sudo rootsh

Start a logged root shell

sudo rootsh -u oracle

Start a logged shell in the context of user oracle.

rootsh -f mysession.log --no-syslog

Start a new shell for your user id, write protocol into mysession.log, do not send anything to syslog. This is identical to "script -f mysession.log"

rootsh -i -u oracle lsnrctl stop

Run command "lsnrctl stop" as user oracle. (this will call sh -c "lsnrctl stop")

rootsh -i -u oracle -- ls -l

Run command "ls -l" as user oracle. (this will call sh -c "ls -l")

Reporting Bugs

Report bugs to Corey Henderson <corman@cormander.com>

See Also

The full documentation for rootsh can be found at http://www.sourceforge.net/projects/rootsh

Info

July 2004 rootsh Gerhard Lausser