11.7. Authorizing users and groups to use the USBGuard IPC interface
By default, only the root user can use the USBGuard public IPC interface interface. You can authorize a specific user or a group to use this interface in addition to root. You can do that either by editing the /etc/usbguard/usbguard-daemon.conf file or by using the usbguard add-user subcommand.
Prerequisites
-
The
usbguardservice is installed and running. -
The
/etc/usbguard/rules.conffile contains an initial rule set generated by theusbguard generate-policycommand.
Procedure
Edit the
/etc/usbguard/usbguard-daemon.conffile with the rules you want to add. For example, to allow all users in thewheelgroup to use the IPC interface, add this line:IPCAllowGroups=wheelYou can add users or groups also with the
usbguardcommand. For example, the following command enables a user to have full access to theDevicesandExceptionssections and to list and modify the current policy:# usbguard add-user <user_name> --devices ALL --policy modify,list --exceptions ALLReplace
<user_name>with the user name that should receive these permissions.You can remove the granted permissions for a user by using the
usbguard remove-user <user_name>command.Restart the
usbguarddaemon to apply your changes:# systemctl restart usbguard