Hello, I have a trouble with check_fail2ban. When I run sudo /usr/lib/nagios/plugins/check_fail2ban on endpoint server every is ok. But In master I see the unknown service. When i inspected the action in master there is executed command 'sudo' '/usr/lib/nagios/plugins/check_fail2ban' '-p' but the -p argument is the issue. Do you know why is executed with argument -p?
The only purpose for this check is to make sure that visudo entries are there. If you manually verified that they're working it's fine too :) Glad that it worked out!
Also the home dir of user1 is /home/icinga/
I have add (ALL) NOPASSWD: because i dont use a password for the users .
i can run with sudo fail2ban-client status but without sudo it doesnt work
Also the home dir of user1 is /home/icinga/
I have add (ALL) NOPASSWD: because i dont use a password for the users .
i can run with sudo fail2ban-client status but without sudo it doesnt worl
User user1 may run the following commands on vm-1:
(ALL) NOPASSWD: /usr/bin/fail2ban-client status
(ALL) NOPASSWD: /usr/bin/fail2ban-client status
(ALL) NOPASSWD: /usr/bin/fail2ban-client get bantime
(ALL) NOPASSWD: /home/icinga/nagios-plugins/check_fail2ban
(ALL) NOPASSWD: /usr/bin/fail2ban-client
Hi! Make sure to replace all 3 "nagios" with user1 in visudo. Additionally you have to change the user 'nagios' in line 53 too, else it searches for the commands for the wrong user. Does that help you?
If it still doesnt work please post the result of the command sudo -l -U user1
Hello
I am having trouble executing the plugin.I have changed the user from nagios to user1 because this is my user and have added the visudo .But i get :Error: Not all sudo permissions available! Please refer to documentation
Also my user1 have sudo rights.
Hi, the check_fail2ban script has no
-p
parameter. Did you check your icinga / nagios config if you've set it somewhere there?Hello, I have a trouble with check_fail2ban. When I run sudo /usr/lib/nagios/plugins/check_fail2ban on endpoint server every is ok. But In master I see the unknown service. When i inspected the action in master there is executed command 'sudo' '/usr/lib/nagios/plugins/check_fail2ban' '-p' but the -p argument is the issue. Do you know why is executed with argument -p?
The only purpose for this check is to make sure that visudo entries are there. If you manually verified that they're working it's fine too :) Glad that it worked out!
i just commented 53-60 amd is working with this command sudo ./check_fail2ban -t -w 5 -c 10 -j sshd
Just done it but still no working
I see, it fails because it expects (root) as output from the visudo command. Replacing (root) with (ALL) in line 54- 56 should do the trick.
ANd on line 53 i have changed to user1 but didnt worked
Also the home dir of user1 is /home/icinga/ I have add (ALL) NOPASSWD: because i dont use a password for the users . i can run with sudo fail2ban-client status but without sudo it doesnt work
Also the home dir of user1 is /home/icinga/ I have add (ALL) NOPASSWD: because i dont use a password for the users . i can run with sudo fail2ban-client status but without sudo it doesnt worl
User user1 may run the following commands on vm-1: (ALL) NOPASSWD: /usr/bin/fail2ban-client status (ALL) NOPASSWD: /usr/bin/fail2ban-client status (ALL) NOPASSWD: /usr/bin/fail2ban-client get bantime (ALL) NOPASSWD: /home/icinga/nagios-plugins/check_fail2ban (ALL) NOPASSWD: /usr/bin/fail2ban-client
Hi! Make sure to replace all 3 "nagios" with user1 in visudo. Additionally you have to change the user 'nagios' in line 53 too, else it searches for the commands for the wrong user. Does that help you? If it still doesnt work please post the result of the command sudo -l -U user1
Hello I am having trouble executing the plugin.I have changed the user from nagios to user1 because this is my user and have added the visudo .But i get :Error: Not all sudo permissions available! Please refer to documentation Also my user1 have sudo rights.