table of contents
USBGUARD(1) | USBGUARD(1) |
NAME¶
usbguard - USBGuard command-line interface
SYNOPSIS¶
usbguard [OPTIONS] <subcommand> [SUBCOMMAND-OPTIONS] ...
usbguard list-devices
usbguard allow-device id
usbguard block-device id
usbguard reject-device id
usbguard list-rules
usbguard append-rule rule
usbguard remove-rule id
usbguard generate-policy
usbguard watch
usbguard read-descriptor file
usbguard add-user name
usbguard remove-user name
DESCRIPTION¶
The usbguard command provides a command-line interface (CLI) to a running usbguard-daemon(8) instance. It also provides a tool for generating initial USBGuard policies based on USB devices connected to the system.
SUBCOMMANDS¶
list-devices¶
List all USB devices recognized by the USBGuard daemon.
Available options:
-a, --allowed
-b, --blocked
-h, --help
allow-device [OPTIONS] id¶
Authorize a device identified by the device id to interact with the system.
Available options:
-p, --permanent
-h, --help
block-device [OPTIONS] id¶
Deauthorize a device identified by the device id.
Available options:
-p, --permanent
-h, --help
reject-device [OPTIONS] id¶
Deauthorize and remove a device identified by the device id.
Available options:
-p, --permanent
-h, --help
list-rules [OPTIONS]¶
List the rule set (policy) used by the USBGuard daemon.
Available options:
-d, --show-devices
-h, --help
append-rule [OPTIONS] rule¶
Append the rule to the current rule set.
Available options:
-a, --after id
-h, --help
remove-rule [OPTIONS] id¶
Remove a rule identified by the rule id from the rule set.
Available options:
-h, --help
generate-policy [OPTIONS]¶
Generate a rule set (policy) which authorizes the currently connected USB devices.
Available options:
-p, --with-ports
-P, --no-ports-sn
-t, --target target
-X, --no-hashes
-H, --hash-only
-h, --help
watch [OPTIONS]¶
Watch the IPC interface events and print them to stdout.
Available options:
-w, --wait
-o, --once
-e, --exec path
-h, --help
read-descriptor [OPTIONS] file¶
Read a USB descriptor from a file and print it in human-readable form.
Available options:
-h, --help
add-user name [OPTIONS]¶
Create an IPC access control file allowing the user/group identified by name to use the USBGuard IPC bus. The change takes effect only after restarting the usbguard-daemon(8) instance.
Available options:
-u, --user
-g, --group
-p, --policy privileges
-d, --devices privileges
-e, --exceptions privileges
-P, --parameters privileges
-h, --help
Privileges:
The privileges are expected to be in the form of a list separated by a colon:
$ sudo usbguard add-user joe --devices=listen,modify
Consult the usbguard-daemon.conf(5) man-page for a detailed list of available privileges in each section.
remove-user name [OPTIONS]¶
Remove an IPC access control file associated with the user/group identified by name. The change takes effect only after restarting the usbguard-daemon(8) instance.
Available options:
-u, --user
-g, --group
-h, --help
EXAMPLES¶
Generating an initial policy:
SEE ALSO¶
usbguard-daemon(8), usbguard-daemon.conf(5), usbguard-rules.conf(5)
04/01/2020 |