slog man page

slog — execute a command as another user

Synopsis

slog [-u user]
slog [-u user] [-h] [command and args]

Description

slog is a shortcut to running "sudo [-u $USER] sslogger [cmd and args]"

ssloger is session keystroke logging utility and allows permitted users to execute commands, or open interactive shells as the superuser or another user. When used in interactive session mode, keystrokes are recorded in a special file. Privileged user escalation is set by standard sudo rules in sudoers file. A tty is required for interactive sessions

See the manpage for sslogger(8) for details

Options

slog accepts the following command line options:

-u <USER>
Run command or interactive shell as USER. If not specified, the root user is assumed
[command and args]
Execute "command and args" instead if interactive shell. Provides ability run sslogger within a script. non-interactive mode
-h
Stay in current working directory, do not cd to USER home dir
-d
Debug -f Flush buffer on every newline
The sreplay command can be used to sreplay recorded sessions
sreplay <filename>
Replays interactive session identified by filename

Return Values

In interactive mode, always exits 0.

When run in a non-interactive mode, slog returns the value of the command being run.

Files

/etc/sslogger.d/sslogger.conf

Configuration file - see man sslogger.conf(5) for details

/etc/sudoers

Sudo Configuration file - see man sslogger(8) for example configurations and man sudoers(5) for sudoer details

/var/log/slog

Default directory in which sessions are logged

Examples

Note: the following examples assume suitable sudoers(5) entries.

$ slog
- Obtains an interactive shell as root.
$ slog ls -l /root
- Runs a command as root, then exists.
$ slog -u user2
- Obtains an interactive shell as another user.
$ slog -u user2 -h
- Obtains an interactive shell as user2 whilst remaining in the current working directory.
$ sreplay <filename>
- Replays an interactive session log (may require user to be added to sloggers group, see (CONFIGURATION Files)

Bugs

If you feel you have found a bug in sslogger, please submit a bug report at http://sslogger.sourceforge.net

Support

Limited free support is available via the sslogger-users mailing list, see http://sslogger.sourceforge.net to subscribe or search the archives.

Author

Edward Brand <edbrand@brandint.com>

See Also

sslogger(8) ssloger.conf(5) sreplay(8) sudo(8), sudoers(8), su(2)

Referenced By

sreplay(8), sslogger(8), sslogger.conf(5), sslogger-slogd(8).

February 2009 Linux User Manuals