From Fedora Project Wiki
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
# 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. | # 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. | # Prepare a USB device which is not connected to the system. For example a USB flash drive. | ||
{{admon/tip|How to get to a clean state|As root, run | {{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= | ||
# As root, generate an initial policy using the following command: | # As root, generate an initial policy using the following command: {{command|usbguard generate-policy -P > /etc/usbguard/rules.conf}} | ||
# Start the usbguard service: | # Start the usbguard service: {{command|systemctl start usbguard}} | ||
# Check that your connected USB devices are still working. Try to reconnect some of them and check that they are still working. | # Check that your connected USB devices are still working. Try to reconnect some of them and check that they are still working. | ||
# Connect the new device to the system and try whether it's working. | # Connect the new device to the system and try whether it's working. |
Revision as of 15:18, 7 August 2016
Description
This test case tests usbguard
initial setup procedure.
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
- As root, generate an initial policy using the following command:
usbguard generate-policy -P > /etc/usbguard/rules.conf
- Start the usbguard service:
systemctl start usbguard
- Check that your connected USB devices are still working. Try to reconnect some of them and check that they are still working.
- Connect the new device to the system and try whether it's working.
Expected Results
- USB devices work after the usbguard service start.
- Reconnected USB devices work.
- Newly connected USB devices do not work.