Hi dwh,
I have executed the below commands and downloaded the file mentioned in the link you provided.
But issue dint resolved.Myself also troubleshooting .Kindly suggest some fix as ,it is affecting our business.
xecute the following commands (use your XI version download link in the wget command):
cd /tmp
wget
https://assets.nagios.com/downloads/nag ... 2.9.tar.gz
Once downloaded you'll need to use the name of the downloaded file in the next command, in this example xi-5.2.9.tar.gz is the name being used:
tar xzf xi-5.2.9.tar.gz nagiosxi/nagiosxi/nagiosxi.sudoers --strip-components 2
This will have extracted a file called nagiosxi.sudoers and this file contains all the correct entries.
Run all these commands to fix your /etc/sudoers file to make sure it has all the correct entries:
grep -v NAGIOSXI /etc/sudoers > /etc/sudoers.new
mv -f /etc/sudoers.new /etc/sudoers
rm -rf /etc/sudoers.d/nagiosxi
sed -i 's/^Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
cat /tmp/nagiosxi.sudoers >> /etc/sudoers
chmod 440 /etc/sudoers
Run this one last command to ensure the old lock file is removed:
rm -f /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
PFB output after executing the above script:
[nagios@OSLMSnagios scripts]$ ./reconfigure_nagios.sh
URL:
http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies
http://loca lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm it=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=c onfigadmin' -O nagiosql.login--2018-02-02 08:21:07--
http://localhost/nagiosxi/ includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 401 Authorization Required
Authorization failed.
NAGIOSQL LOGIN FAILED!
Thanks & Regards,
Neha Singh.