slog man page
slog — execute a command as another user
slog [-u user]
slog [-u user] [-h] [command and args]
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
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
Stay in current working directory, do not cd to USER home dir
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
In interactive mode, always exits 0.
When run in a non-interactive mode, slog returns the value of the command being run.
Configuration file - see man sslogger.conf(5) for details
Sudo Configuration file - see man sslogger(8) for example configurations and man sudoers(5) for sudoer details
Default directory in which sessions are logged
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)
If you feel you have found a bug in sslogger, please submit a bug report at http://sslogger.sourceforge.net
Limited free support is available via the sslogger-users mailing list, see http://sslogger.sourceforge.net to subscribe or search the archives.
Edward Brand <firstname.lastname@example.org>
sslogger(8) ssloger.conf(5) sreplay(8) sudo(8), sudoers(8), su(2)
sreplay(8), sslogger(8), sslogger.conf(5), sslogger-slogd(8).