USBGuard / usbguard

USBGuard is a software framework for implementing USB device authorization policies (what kind of USB devices are authorized) as well as method of use policies (how a USB device may interact with the system)
https://usbguard.github.io/
GNU General Public License v2.0
1.14k stars 140 forks source link

Installation procedure and doc could be better #474

Closed TriplEight closed 2 years ago

TriplEight commented 3 years ago

In order to make it work on debian 10/ ubuntu 20.04 I had to:

  1. install dependencies
    sudo apt install -y protobuf-compiler libsodium-dev libpolkit-gobject-1-dev libaudit-dev libcap-ng-dev libldap-dev

    Of course, some of deps were not necessary, but it was far not a first attempt. CI config helped a bunch.

  2. configure
    ./configure --with-bundled-catch --with-bundled-pegtl --enable-systemd

    and carefully follow the warnings in case if something important was missing.

  3. make and carefully watch the logs
  4. sudo make install and carefully watch the logs
  5. check where it created the config files, in my case it was /usr/local/etc/usbguard/
  6. make check should not fail
  7. Important: do not lock yourself from your USB devices generate the current config with sudo usbguard generate-policy > /usr/local/etc/usbguard/rules.conf thanks arch wiki
  8. sudo systemctl start usbguard.service
  9. sudo systemctl status usbguard.service this shouldn't return errors, if it does, stop, fix and restart
  10. sudo usbguard list-rules check if important devices are allowed
  11. sudo systemctl enable usbguard.service when everything works

This is maybe a bit extensive to put into a doc, but there might be something like a QuickStart.md for mere mortals. Please tell me what you think and I'll do a PR.

Cropi commented 3 years ago

Hi @TriplEight,

The idea to update documentation sounds like a good idea to me. The most important thing to mention might be the initial policy generation. Feel free to open a PR for README.md, so newcomers will see it on the landing page.