From Fedora Project Wiki
(Created page with "{{QA/Test_Case |description=This test case tests {{package|usbguard}} CLI device management. |setup= # Ensure the {{package|usbguard}} package is installed # To start from a c...") |
No edit summary |
||
Line 8: | Line 8: | ||
{{admon/tip|How to get to a clean state|As root, run {{command|systemctl stop usbguard}} and {{command|rm -f /etc/usbguard/rules.conf}}. '''This will remove your policy, so make a backup if you don't want to lose it'''.}} | {{admon/tip|How to get to a clean state|As root, run {{command|systemctl stop usbguard}} and {{command|rm -f /etc/usbguard/rules.conf}}. '''This will remove your policy, so make a backup if you don't want to lose it'''.}} | ||
|actions= | |actions= | ||
# Start the usbguard service: | # Start the usbguard service: <pre># systemctl start usbguard</pre> | ||
# Check that your connected USB devices are still working. | # Check that your connected USB devices are still working. | ||
# List devices using the usbguard tool and check that all connected USB devices are listed: | # List devices using the usbguard tool and check that all connected USB devices are listed: <pre># usbguard list-devices</pre> | ||
# Connect the new device to the system. The device should be blocked -- not working. | # Connect the new device to the system. The device should be blocked -- not working. | ||
# List blocked device using the usbguard tool: | # List blocked device using the usbguard tool: <pre># usbguard list-devices -b</pre> | ||
# Allow the new device using the usbguard tool: | # Allow the new device using the usbguard tool: <pre># usbguard allow-device <id></pre> | ||
# Check that the new device is working. | # Check that the new device is working. | ||
# List blocked device and check that the list is empty: | # List blocked device and check that the list is empty: <pre># usbguard list-devices -b</pre> | ||
|results= | |results= | ||
# USB devices work after the usbguard service start. | # USB devices work after the usbguard service start. |
Latest revision as of 08:15, 22 August 2016
Description
This test case tests usbguard
CLI device management.
Setup
- Ensure the
usbguard
package is installed - To start from a clean state, ensure that the usbguard service is stopped and that there's no existing policy.
- Ensure that there's at least one USB device connected to your system which can be disconnected and connected again. For example a USB keyboard or mouse.
- Prepare a USB device which is not connected to the system. For example a USB flash drive.
How to test
- Start the usbguard service:
# systemctl start usbguard
- Check that your connected USB devices are still working.
- List devices using the usbguard tool and check that all connected USB devices are listed:
# usbguard list-devices
- Connect the new device to the system. The device should be blocked -- not working.
- List blocked device using the usbguard tool:
# usbguard list-devices -b
- Allow the new device using the usbguard tool:
# usbguard allow-device <id>
- Check that the new device is working.
- List blocked device and check that the list is empty:
# usbguard list-devices -b
Expected Results
- USB devices work after the usbguard service start.
- Newly connected USB devices do not work.
- Blocked devices work after allowing them using the usbguard tool.