×


How to fix Nagios error could not create or update nagios configtest

Sometimes in the process of starting Nagios service, users can experience an error such as "Error: could not create or update nagios.configtest".


As part of our Server Management Services here at Ibmi Media, we regularly help our Customers to solve Nagios related errors.


In this context, we shall look into the main causes of this error and how to get rid of it.


What triggers Nagios Error: could not create or update nagios.configtest?

As earlier stated, this error occurs in the process of starting Nagios service.

This is caused when the Nagios user account does not have a user shell, especially when nologin is used in the passwd file as shown below;


nagios:x:1005:1005::/home/nagios:/usr/sbin/nologin


How to fix Nagios Error: could not create or update nagios.configtest?

Removing the "/usr/sbin/nologin" directive from the passwd file or declaring it as a valid shell can help to fix the Nagios error.

For instance, your can remove make some declarations as shown below;


When No Shell is defined;

nagios:x:1005:1005::/home/nagios:


When Bash shell is defined'

nagios:x:100:100::/home/nagios:/bin/bash


Once you update the passwd file, then Nagios will start successfully.


Need support in solving Nagios errors? We are available to help you today.


Conclusion

This article will guide you on how to fix Nagios Error: could not create or update nagios.configtest which stops Nagios from starting correctly.