Solved: ERROR: Could not create or update ‘/usr/local/nagios/var/nagios.configtest’
Today we will see one of the common Nagios error message and its solution which comes when we install Nagios first time.
Error Message
When we install Nagios and try to start the service first time, we used to encounter below issue.
[root@ngelinux01 ~]# service nagios start Starting nagios: Running configuration check... This account is currently not available. ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest' [root@ngelinux01 ~]#
Solution
This error message comes since there is no login shell assigned to Nagios user.
### As we can see below, nologin is assigned to this user. [root@ngelinux01 ~]# cat /etc/passwd | grep -i nagios nagios:x:493:485::/var/spool/nagios:/sbin/nologin ### Change it to Bash shell [root@ngelinux01 ~]# usermod -s /bin/bash nagios ### Check the changes [root@ngelinux01 ~]# cat /etc/passwd | grep -i nagios nagios:x:493:485::/var/spool/nagios:/bin/bash [root@ngelinux01 ~]# ### Now restart the service [root@ngelinux01 ~]# service nagios start Starting nagios: Running configuration check... done.
Hence as we can see above, now the error is disappeared.
And now we are able to start the service.