Packages and Binaries:

sudo

Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.

This version is built with minimal shared library dependencies, use the sudo-ldap package instead if you need LDAP support for sudoers.

Installed size: 5.77 MB
How to install: sudo apt install sudo

Dependencies:
  • init-system-helpers
  • libaudit1
  • libc6
  • libpam-modules
  • libpam0g
  • libselinux1
  • lsb-base
  • zlib1g
cvtsudoers

Convert between sudoers file formats

[email protected]:~# cvtsudoers -h
cvtsudoers - convert between sudoers file formats

usage: cvtsudoers [-ehMpV] [-b dn] [-c conf_file ] [-d deftypes] [-f output_format] [-i input_format] [-I increment] [-m filter] [-o output_file] [-O start_point] [-P padding] [-s sections] [input_file]

Options:
  -b, --base=dn              the base DN for sudo LDAP queries
  -c, --config=conf_file     the path to the configuration file
  -d, --defaults=deftypes    only convert Defaults of the specified types
  -e, --expand-aliases       expand aliases when converting
  -f, --output-format=format set output format: JSON, LDIF or sudoers
  -i, --input-format=format  set input format: LDIF or sudoers
  -I, --increment=num        amount to increase each sudoOrder by
  -h, --help                 display help message and exit
  -m, --match=filter         only convert entries that match the filter
  -M, --match-local          match filter uses passwd and group databases
  -o, --output=output_file   write converted sudoers to output_file
  -O, --order-start=num      starting point for first sudoOrder
  -p, --prune-matches        prune non-matching users, groups and hosts
  -P, --padding=num          base padding for sudoOrder increment
  -s, --suppress=sections    suppress output of certain sections
  -V, --version              display version information and exit

cvtsudoers

Convert between sudoers file formats

[email protected]:~# cvtsudoers -h
cvtsudoers - convert between sudoers file formats

usage: cvtsudoers [-ehMpV] [-b dn] [-c conf_file ] [-d deftypes] [-f output_format] [-i input_format] [-I increment] [-m filter] [-o output_file] [-O start_point] [-P padding] [-s sections] [input_file]

Options:
  -b, --base=dn              the base DN for sudo LDAP queries
  -c, --config=conf_file     the path to the configuration file
  -d, --defaults=deftypes    only convert Defaults of the specified types
  -e, --expand-aliases       expand aliases when converting
  -f, --output-format=format set output format: JSON, LDIF or sudoers
  -i, --input-format=format  set input format: LDIF or sudoers
  -I, --increment=num        amount to increase each sudoOrder by
  -h, --help                 display help message and exit
  -m, --match=filter         only convert entries that match the filter
  -M, --match-local          match filter uses passwd and group databases
  -o, --output=output_file   write converted sudoers to output_file
  -O, --order-start=num      starting point for first sudoOrder
  -p, --prune-matches        prune non-matching users, groups and hosts
  -P, --padding=num          base padding for sudoOrder increment
  -s, --suppress=sections    suppress output of certain sections
  -V, --version              display version information and exit

sudo

Execute a command as another user

[email protected]:~# sudo -h
sudo - execute a command as another user

usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-ABbEHknPS] [-r role] [-t type] [-C num] [-D directory] [-g group]
            [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
            [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-ABknS] [-r role] [-t type] [-C num] [-D directory] [-g group]
            [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...

Options:
  -A, --askpass                 use a helper program for password prompting
  -b, --background              run command in the background
  -B, --bell                    ring bell when prompting
  -C, --close-from=num          close all file descriptors >= num
  -D, --chdir=directory         change the working directory before running
                                command
  -E, --preserve-env            preserve user environment when running command
      --preserve-env=list       preserve specific environment variables
  -e, --edit                    edit files instead of running a command
  -g, --group=group             run command as the specified group name or ID
  -H, --set-home                set HOME variable to target user's home dir
  -h, --help                    display help message and exit
  -h, --host=host               run command on host (if supported by plugin)
  -i, --login                   run login shell as the target user; a command
                                may also be specified
  -K, --remove-timestamp        remove timestamp file completely
  -k, --reset-timestamp         invalidate timestamp file
  -l, --list                    list user's privileges or check a specific
                                command; use twice for longer format
  -n, --non-interactive         non-interactive mode, no prompts are used
  -P, --preserve-groups         preserve group vector instead of setting to
                                target's
  -p, --prompt=prompt           use the specified password prompt
  -R, --chroot=directory        change the root directory before running command
  -r, --role=role               create SELinux security context with specified
                                role
  -S, --stdin                   read password from standard input
  -s, --shell                   run shell as the target user; a command may
                                also be specified
  -t, --type=type               create SELinux security context with specified
                                type
  -T, --command-timeout=timeout terminate command after the specified time limit
  -U, --other-user=user         in list mode, display privileges for user
  -u, --user=user               run command (or edit file) as specified user
                                name or ID
  -V, --version                 display version information and exit
  -v, --validate                update user's timestamp without running a
                                command
  --                            stop processing command line arguments

sudo

Execute a command as another user

[email protected]:~# sudo -h
sudo - execute a command as another user

usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-ABbEHknPS] [-r role] [-t type] [-C num] [-D directory] [-g group]
            [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
            [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-ABknS] [-r role] [-t type] [-C num] [-D directory] [-g group]
            [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...

Options:
  -A, --askpass                 use a helper program for password prompting
  -b, --background              run command in the background
  -B, --bell                    ring bell when prompting
  -C, --close-from=num          close all file descriptors >= num
  -D, --chdir=directory         change the working directory before running
                                command
  -E, --preserve-env            preserve user environment when running command
      --preserve-env=list       preserve specific environment variables
  -e, --edit                    edit files instead of running a command
  -g, --group=group             run command as the specified group name or ID
  -H, --set-home                set HOME variable to target user's home dir
  -h, --help                    display help message and exit
  -h, --host=host               run command on host (if supported by plugin)
  -i, --login                   run login shell as the target user; a command
                                may also be specified
  -K, --remove-timestamp        remove timestamp file completely
  -k, --reset-timestamp         invalidate timestamp file
  -l, --list                    list user's privileges or check a specific
                                command; use twice for longer format
  -n, --non-interactive         non-interactive mode, no prompts are used
  -P, --preserve-groups         preserve group vector instead of setting to
                                target's
  -p, --prompt=prompt           use the specified password prompt
  -R, --chroot=directory        change the root directory before running command
  -r, --role=role               create SELinux security context with specified
                                role
  -S, --stdin                   read password from standard input
  -s, --shell                   run shell as the target user; a command may
                                also be specified
  -t, --type=type               create SELinux security context with specified
                                type
  -T, --command-timeout=timeout terminate command after the specified time limit
  -U, --other-user=user         in list mode, display privileges for user
  -u, --user=user               run command (or edit file) as specified user
                                name or ID
  -V, --version                 display version information and exit
  -v, --validate                update user's timestamp without running a
                                command
  --                            stop processing command line arguments

sudo_logsrvd

Sudo event and I/O log server

[email protected]:~# sudo_logsrvd -h
sudo_logsrvd - sudo log server


Options:
  -f, --file            path to configuration file
  -h, --help            display help message and exit
  -n, --no-fork         do not fork, run in the foreground
  -R, --random-drop     percent chance connections will drop
  -V, --version         display version information and exit


sudo_logsrvd

Sudo event and I/O log server

[email protected]:~# sudo_logsrvd -h
sudo_logsrvd - sudo log server


Options:
  -f, --file            path to configuration file
  -h, --help            display help message and exit
  -n, --no-fork         do not fork, run in the foreground
  -R, --random-drop     percent chance connections will drop
  -V, --version         display version information and exit


sudo_sendlog

Send sudo I/O log to log server

[email protected]:~# sudo_sendlog --help
sudo_sendlog - send sudo I/O log to remote server


Options:
      --help            display help message and exit
  -A, --accept          only send an accept event (no I/O)
  -h, --host            host to send logs to
  -i, --iolog_id        remote ID of I/O log to be resumed
  -p, --port            port to use when connecting to host
  -r, --restart         restart previous I/O log transfer
  -R, --reject          reject the command with the given reason
  -s, --stop-after        stop transfer after reaching this time
  -t, --test            test audit server by sending selected I/O log n times in parallel
  -V, --version         display version information and exit


sudo_sendlog

Send sudo I/O log to log server

[email protected]:~# sudo_sendlog --help
sudo_sendlog - send sudo I/O log to remote server


Options:
      --help            display help message and exit
  -A, --accept          only send an accept event (no I/O)
  -h, --host            host to send logs to
  -i, --iolog_id        remote ID of I/O log to be resumed
  -p, --port            port to use when connecting to host
  -r, --restart         restart previous I/O log transfer
  -R, --reject          reject the command with the given reason
  -s, --stop-after        stop transfer after reaching this time
  -t, --test            test audit server by sending selected I/O log n times in parallel
  -V, --version         display version information and exit


sudoedit

Execute a command as another user

[email protected]:~# sudoedit -h
sudoedit - edit files as another user

usage: sudoedit -h | -V
usage: sudoedit [-ABknS] [-r role] [-t type] [-C num] [-D directory] [-g group]
                [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
                file ...

Options:
  -A, --askpass                 use a helper program for password prompting
  -B, --bell                    ring bell when prompting
  -C, --close-from=num          close all file descriptors >= num
  -D, --chdir=directory         change the working directory before running
                                command
  -g, --group=group             run command as the specified group name or ID
  -h, --help                    display help message and exit
  -h, --host=host               run command on host (if supported by plugin)
  -k, --reset-timestamp         invalidate timestamp file
  -n, --non-interactive         non-interactive mode, no prompts are used
  -p, --prompt=prompt           use the specified password prompt
  -R, --chroot=directory        change the root directory before running command
  -r, --role=role               create SELinux security context with specified
                                role
  -S, --stdin                   read password from standard input
  -t, --type=type               create SELinux security context with specified
                                type
  -T, --command-timeout=timeout terminate command after the specified time limit
  -u, --user=user               run command (or edit file) as specified user
                                name or ID
  -V, --version                 display version information and exit
  --                            stop processing command line arguments

sudoedit

Execute a command as another user

[email protected]:~# sudoedit -h
sudoedit - edit files as another user

usage: sudoedit -h | -V
usage: sudoedit [-ABknS] [-r role] [-t type] [-C num] [-D directory] [-g group]
                [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
                file ...

Options:
  -A, --askpass                 use a helper program for password prompting
  -B, --bell                    ring bell when prompting
  -C, --close-from=num          close all file descriptors >= num
  -D, --chdir=directory         change the working directory before running
                                command
  -g, --group=group             run command as the specified group name or ID
  -h, --help                    display help message and exit
  -h, --host=host               run command on host (if supported by plugin)
  -k, --reset-timestamp         invalidate timestamp file
  -n, --non-interactive         non-interactive mode, no prompts are used
  -p, --prompt=prompt           use the specified password prompt
  -R, --chroot=directory        change the root directory before running command
  -r, --role=role               create SELinux security context with specified
                                role
  -S, --stdin                   read password from standard input
  -t, --type=type               create SELinux security context with specified
                                type
  -T, --command-timeout=timeout terminate command after the specified time limit
  -u, --user=user               run command (or edit file) as specified user
                                name or ID
  -V, --version                 display version information and exit
  --                            stop processing command line arguments

sudoreplay

Replay sudo session logs

[email protected]:~# sudoreplay -h
sudoreplay - replay sudo session logs

usage: sudoreplay [-hnRS] [-d dir] [-m num] [-s num] ID
usage: sudoreplay [-h] [-d dir] -l [search expression]

Options:
  -d, --directory=dir    specify directory for session logs
  -f, --filter=filter    specify which I/O type(s) to display
  -h, --help             display help message and exit
  -l, --list             list available session IDs, with optional expression
  -m, --max-wait=num     max number of seconds to wait between events
  -n, --non-interactive  no prompts, session is sent to the standard output
  -R, --no-resize        do not attempt to re-size the terminal
  -S, --suspend-wait     wait while the command was suspended
  -s, --speed=num        speed up or slow down output
  -V, --version          display version information and exit

sudoreplay

Replay sudo session logs

[email protected]:~# sudoreplay -h
sudoreplay - replay sudo session logs

usage: sudoreplay [-hnRS] [-d dir] [-m num] [-s num] ID
usage: sudoreplay [-h] [-d dir] -l [search expression]

Options:
  -d, --directory=dir    specify directory for session logs
  -f, --filter=filter    specify which I/O type(s) to display
  -h, --help             display help message and exit
  -l, --list             list available session IDs, with optional expression
  -m, --max-wait=num     max number of seconds to wait between events
  -n, --non-interactive  no prompts, session is sent to the standard output
  -R, --no-resize        do not attempt to re-size the terminal
  -S, --suspend-wait     wait while the command was suspended
  -s, --speed=num        speed up or slow down output
  -V, --version          display version information and exit

visudo

Edit the sudoers file

[email protected]:~# visudo -h
visudo - safely edit the sudoers file

usage: visudo [-chqsV] [[-f] sudoers ]

Options:
  -c, --check              check-only mode
  -f, --file=sudoers       specify sudoers file location
  -h, --help               display help message and exit
  -q, --quiet              less verbose (quiet) syntax error messages
  -s, --strict             strict syntax checking
  -V, --version            display version information and exit


visudo

Edit the sudoers file

[email protected]:~# visudo -h
visudo - safely edit the sudoers file

usage: visudo [-chqsV] [[-f] sudoers ]

Options:
  -c, --check              check-only mode
  -f, --file=sudoers       specify sudoers file location
  -h, --help               display help message and exit
  -q, --quiet              less verbose (quiet) syntax error messages
  -s, --strict             strict syntax checking
  -V, --version            display version information and exit


sudo-ldap

Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.

This version is built with LDAP support, which allows an equivalent of the sudoers database to be distributed via LDAP. Authentication is still performed via pam.

Installed size: 5.84 MB
How to install: sudo apt install sudo-ldap

Dependencies:
  • init-system-helpers
  • libaudit1
  • libc6
  • libldap-2.5-0
  • libpam-modules
  • libpam0g
  • libselinux1
  • lsb-base
  • zlib1g
cvtsudoers

Convert between sudoers file formats

[email protected]:~# cvtsudoers -h
cvtsudoers - convert between sudoers file formats

usage: cvtsudoers [-ehMpV] [-b dn] [-c conf_file ] [-d deftypes] [-f output_format] [-i input_format] [-I increment] [-m filter] [-o output_file] [-O start_point] [-P padding] [-s sections] [input_file]

Options:
  -b, --base=dn              the base DN for sudo LDAP queries
  -c, --config=conf_file     the path to the configuration file
  -d, --defaults=deftypes    only convert Defaults of the specified types
  -e, --expand-aliases       expand aliases when converting
  -f, --output-format=format set output format: JSON, LDIF or sudoers
  -i, --input-format=format  set input format: LDIF or sudoers
  -I, --increment=num        amount to increase each sudoOrder by
  -h, --help                 display help message and exit
  -m, --match=filter         only convert entries that match the filter
  -M, --match-local          match filter uses passwd and group databases
  -o, --output=output_file   write converted sudoers to output_file
  -O, --order-start=num      starting point for first sudoOrder
  -p, --prune-matches        prune non-matching users, groups and hosts
  -P, --padding=num          base padding for sudoOrder increment
  -s, --suppress=sections    suppress output of certain sections
  -V, --version              display version information and exit

sudo

Execute a command as another user

[email protected]:~# sudo -h
sudo - execute a command as another user

usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-ABbEHknPS] [-r role] [-t type] [-C num] [-D directory] [-g group]
            [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
            [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-ABknS] [-r role] [-t type] [-C num] [-D directory] [-g group]
            [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...

Options:
  -A, --askpass                 use a helper program for password prompting
  -b, --background              run command in the background
  -B, --bell                    ring bell when prompting
  -C, --close-from=num          close all file descriptors >= num
  -D, --chdir=directory         change the working directory before running
                                command
  -E, --preserve-env            preserve user environment when running command
      --preserve-env=list       preserve specific environment variables
  -e, --edit                    edit files instead of running a command
  -g, --group=group             run command as the specified group name or ID
  -H, --set-home                set HOME variable to target user's home dir
  -h, --help                    display help message and exit
  -h, --host=host               run command on host (if supported by plugin)
  -i, --login                   run login shell as the target user; a command
                                may also be specified
  -K, --remove-timestamp        remove timestamp file completely
  -k, --reset-timestamp         invalidate timestamp file
  -l, --list                    list user's privileges or check a specific
                                command; use twice for longer format
  -n, --non-interactive         non-interactive mode, no prompts are used
  -P, --preserve-groups         preserve group vector instead of setting to
                                target's
  -p, --prompt=prompt           use the specified password prompt
  -R, --chroot=directory        change the root directory before running command
  -r, --role=role               create SELinux security context with specified
                                role
  -S, --stdin                   read password from standard input
  -s, --shell                   run shell as the target user; a command may
                                also be specified
  -t, --type=type               create SELinux security context with specified
                                type
  -T, --command-timeout=timeout terminate command after the specified time limit
  -U, --other-user=user         in list mode, display privileges for user
  -u, --user=user               run command (or edit file) as specified user
                                name or ID
  -V, --version                 display version information and exit
  -v, --validate                update user's timestamp without running a
                                command
  --                            stop processing command line arguments

sudo_logsrvd

Sudo event and I/O log server

[email protected]:~# sudo_logsrvd -h
sudo_logsrvd - sudo log server


Options:
  -f, --file            path to configuration file
  -h, --help            display help message and exit
  -n, --no-fork         do not fork, run in the foreground
  -R, --random-drop     percent chance connections will drop
  -V, --version         display version information and exit


sudo_sendlog

Send sudo I/O log to log server

[email protected]:~# sudo_sendlog --help
sudo_sendlog - send sudo I/O log to remote server


Options:
      --help            display help message and exit
  -A, --accept          only send an accept event (no I/O)
  -h, --host            host to send logs to
  -i, --iolog_id        remote ID of I/O log to be resumed
  -p, --port            port to use when connecting to host
  -r, --restart         restart previous I/O log transfer
  -R, --reject          reject the command with the given reason
  -s, --stop-after        stop transfer after reaching this time
  -t, --test            test audit server by sending selected I/O log n times in parallel
  -V, --version         display version information and exit


sudoedit

Execute a command as another user

[email protected]:~# sudoedit -h
sudoedit - edit files as another user

usage: sudoedit -h | -V
usage: sudoedit [-ABknS] [-r role] [-t type] [-C num] [-D directory] [-g group]
                [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
                file ...

Options:
  -A, --askpass                 use a helper program for password prompting
  -B, --bell                    ring bell when prompting
  -C, --close-from=num          close all file descriptors >= num
  -D, --chdir=directory         change the working directory before running
                                command
  -g, --group=group             run command as the specified group name or ID
  -h, --help                    display help message and exit
  -h, --host=host               run command on host (if supported by plugin)
  -k, --reset-timestamp         invalidate timestamp file
  -n, --non-interactive         non-interactive mode, no prompts are used
  -p, --prompt=prompt           use the specified password prompt
  -R, --chroot=directory        change the root directory before running command
  -r, --role=role               create SELinux security context with specified
                                role
  -S, --stdin                   read password from standard input
  -t, --type=type               create SELinux security context with specified
                                type
  -T, --command-timeout=timeout terminate command after the specified time limit
  -u, --user=user               run command (or edit file) as specified user
                                name or ID
  -V, --version                 display version information and exit
  --                            stop processing command line arguments

sudoreplay

Replay sudo session logs

[email protected]:~# sudoreplay -h
sudoreplay - replay sudo session logs

usage: sudoreplay [-hnRS] [-d dir] [-m num] [-s num] ID
usage: sudoreplay [-h] [-d dir] -l [search expression]

Options:
  -d, --directory=dir    specify directory for session logs
  -f, --filter=filter    specify which I/O type(s) to display
  -h, --help             display help message and exit
  -l, --list             list available session IDs, with optional expression
  -m, --max-wait=num     max number of seconds to wait between events
  -n, --non-interactive  no prompts, session is sent to the standard output
  -R, --no-resize        do not attempt to re-size the terminal
  -S, --suspend-wait     wait while the command was suspended
  -s, --speed=num        speed up or slow down output
  -V, --version          display version information and exit

visudo

Edit the sudoers file

[email protected]:~# visudo -h
visudo - safely edit the sudoers file

usage: visudo [-chqsV] [[-f] sudoers ]

Options:
  -c, --check              check-only mode
  -f, --file=sudoers       specify sudoers file location
  -h, --help               display help message and exit
  -q, --quiet              less verbose (quiet) syntax error messages
  -s, --strict             strict syntax checking
  -V, --version            display version information and exit


Updated on: 2022-Nov-16