Thursday, July 18, 2013

Restarting Nagios prompts for password

There is no discussion for this topic as far as I can see so here is my resolution in case it helps anyone

The setup process I have lined up ends up forcing Nagios to ask for a password every time the service is restarted.  The service still starts up fine even if the password is incorrect.  So it really doesnt matter except for one major problem.  If the computer reboots unexpectedly, the service hangs waiting for someone to hit ENTER.  So to fix this, I modified the service script

# vi /etc/rc.d/init.d/nagios
o Search for Starting nagios
o You will see this line
su - $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
o Change the line to this text (or you can comment out the original line and add a new line as pictured below)
touch $NagiosVarDir/nagios.log $NagiosRetentionFile

o Save and exit the file.
o Restart nagios
# service nagios restart
o Done.

No comments:

Post a Comment