14.7. Authorizing users and groups to use the USBGuard IPC interface
Use this procedure to authorize a specific user or a group to use the USBGuard public IPC interface. By default, only the root user can use this interface.
Conditions préalables
-
The
usbguard
service is installed and running. -
The
/etc/usbguard/rules.conf
file contains an initial rule set generated by theusbguard generate-policy
command.
Procédure
Edit the
/etc/usbguard/usbguard-daemon.conf
file with a text editor of your choice:# vi /etc/usbguard/usbguard-daemon.conf
For example, add a line with a rule that allows all users in the
wheel
group to use the IPC interface, and save the file:IPCAllowGroups=wheel
You can add users or groups also with the
usbguard
command. For example, the following command enables the joesec user to have full access to theDevices
andExceptions
sections. Furthermore, joesec can list and modify the current policy:# usbguard add-user joesec --devices ALL --policy modify,list --exceptions ALL
To remove the granted permissions for the joesec user, use the
usbguard remove-user joesec
command.Restart the
usbguard
daemon to apply your changes:# systemctl restart usbguard
Ressources supplémentaires
-
usbguard(1)
andusbguard-rules.conf(5)
man pages.