Closed duhow closed 3 years ago
I know it is not the fix, but as a workaround, you can set fping to /usr/sbin/fping
in the webui
@duhow Cannot reproduce:
$ docker-compose exec librenms php ping.php
Pinged 11 devices in 0.15s
@crazy-max like I said, user root can, user librenms cannot.
root@nukevim:/dev/shm/docker/examples/compose# docker-compose exec librenms php ping.php
Pinged 0 devices in 0.01s
root@nukevim:/dev/shm/docker/examples/compose# docker-compose exec librenms whoami
root
root@nukevim:/dev/shm/docker/examples/compose# docker-compose exec librenms which fping
/usr/sbin/fping
@duhow
$ docker-compose exec --user librenms librenms bash -c "whoami && which fping && php ping.php"
librenms
/usr/sbin/fping
Pinged 11 devices in 0.15s
$ docker-compose exec librenms bash -c "whoami && which fping && php ping.php"
root
/usr/sbin/fping
Pinged 11 devices in 0.15s
Found su -l librenms
does provide the correct path and enables user to execute it.
Behaviour
Steps to reproduce this issue
ping.php
with userlibrenms
Expected behaviour
Actual behaviour
Configuration
librenms/librenms:21.4.0
Logs
Moved from https://github.com/librenms/librenms/issues/12791