Page 2 of 2

Re: Nagios UI reports server Up - False positive

Posted: Fri Apr 24, 2015 2:20 pm
by tezarin
jolson wrote:
nagios:x:408:408::/var/spool/nagios:/sbin/nologin
Would you mind changing the nagios users shell to /bin/bash?
nagios:x:408:408::/var/spool/nagios:/bin/bash
It's somewhat interesting that you don't have a 'nagcmd' group - but that shouldn't be a problem if nagios without that setting.
Let's check permissions on a few files:

Code: Select all

ls -l /usr/local/nagios/var/rw/
Do any of the files in that directory have 'nagcmd' as the group? If so, we should create that group and add nagios+apache to it.

After these changes, can you switch user to nagios and run the ping command as described?

Best,


Jesse
Thanks for your reply. I tried that command but it didn't return anything:

Code: Select all

[root@nagios ~]# ls -l /etc/nagios/var/rw/
ls: cannot access /etc/nagios/var/rw/: No such file or directory
How can I change that nagios users shell to /bin/bash? Wouldn't it break something?

Re: Nagios UI reports server Up - False positive

Posted: Fri Apr 24, 2015 2:37 pm
by jolson
This should do the trick:

Code: Select all

usermod -s /bin/bash nagios
If it impacts functionality, you can always switch it back:

Code: Select all

usermod -s /sbin/nologin nagios
To find any files with the group 'nagcmd':

Code: Select all

find /. -group nagcmd

Re: Nagios UI reports server Up - False positive

Posted: Mon Apr 27, 2015 12:10 pm
by tezarin
jolson wrote:This should do the trick:

Code: Select all

usermod -s /bin/bash nagios
If it impacts functionality, you can always switch it back:

Code: Select all

usermod -s /sbin/nologin nagios
To find any files with the group 'nagcmd':

Code: Select all

find /. -group nagcmd
Thanks for your reply. No group was found by that name. Will look into adding nagios to the /bin/bash.

Thanks much

Re: Nagios UI reports server Up - False positive

Posted: Mon Apr 27, 2015 12:53 pm
by jolson
Sounds good - the group is likely set to 'nagios' instead of 'nagcmd'. Please do look into changing the shell - let us know what you find out.

Jesse

Re: Nagios UI reports server Up - False positive

Posted: Mon Apr 27, 2015 2:43 pm
by tezarin
Maybe it's set to nagios, will have to check for that but since the check_tcp commands is working right now I probably wouldn't change a thing for now so it doesn't break! :-)

Re: Nagios UI reports server Up - False positive

Posted: Mon Apr 27, 2015 2:47 pm
by abrist
Alright. Let us know if you have issues!