Kernel module remove not permitted for some sudo users
I use a sudoers file, which (besides other items) contains following lines:
When I execute the following command /usr/bin/sudo /sbin/modprobe -r bcm2835-v4l2 with my regular user, this works fine without requiring to enter password.
When I run /usr/bin/sudo /sbin/modprobe -r bcm2835-v4l2 using the homebridge user mentioned in the sudoers as well, the command fails with output: modprobe: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module() could not remove 'bcm2835_v4l2': Operation not permitted (, but I am also not asked to enter password)
I am able to execute the /usr/bin/sudo /sbin/reboot command successfully with the homebridge user as well not requiring to enter password.
1. Can you tell what could cause the fact that for both users the rule seem to be applied, as I'm not asked for a password but one of the the two user is not able to run it?
2. And how to fix this, so I'm able to run the command using the homebridge user?
Update 1:
Unfortunately, dmesg contains no additional entries when trying unsuccessful using homebridge user, but follwoing line when using regular user: bcm2835-v4l2-0: unregistering video0
I switched to bcm2835_v4l2 instead of bcm2835-v4l2, but this does not seem to have an effect on the issue.
Executing lsmod | grep bcm2835-v4l2 provided no results, while lsmod | grep bcm2835_v4l2 provided following:
No entries in syslog when unsuccessful trying with homebridge user.
Update 2:
There is no /var/log/secure available, but /var/log/auth.log:
Update 3:
If I unload the module using regular user, and try to load using homebridge user, I also cannot load module:
If the module is already loaded when trying with homebridge user, no error:
Update 3:
Using homebridge user:
Using regular user:
Indeed, homebridge user is not having cap_sys_module assigned. What does this mean and can it be fixed?
Update 4