Hi Team,
The password file htpasswd.users is corrupted, due to which Nagios core login is failing though able to login to NagiosXI. Is there any way to restore the password for all the users from NagiosXI to htpasswd.users file.
Thanks in Advance.
Nagios Core Password Restore
Re: Nagios Core Password Restore
You can grab the htpasswd.users file from one of your backups in /store/backups/nagiosxi directory.
where "xxx.tar.gz" would be the name of your backup, "xxx" would be the name of the directory (after extraction).
You said the file was corrupted, but save a copy of it (just in case), before replacing it with the one from the backup.
Code: Select all
cd /store/backups/nagiosxi
tar xvf xxx.tar.gz
cd xxx
tar xvf nagiosxi.tar.gz usr/local/nagiosxi/etc/htpasswd.users
cd usr/local/nagiosxi/etc/
cp htpasswd.users /usr/local/nagiosxi/etc/
You said the file was corrupted, but save a copy of it (just in case), before replacing it with the one from the backup.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 22
- Joined: Wed Jul 22, 2015 8:32 am
Re: Nagios Core Password Restore
Thanks for your reply. Unfortunately my backup is also corrupted. Is it possible to restore the password file from the NagiosXI / NagiosSQL MySQL database.
Re: Nagios Core Password Restore
It is not going to be possible to restore password from the database. If you don't have "good" backups, then the only option would be to clear the contents of the htpasswd.users file:
After clearing the file, log in Nagios XI and change passwords of users. This way, they will be re-added to the htpasswd.users file.
Code: Select all
cat /dev/null > /usr/local/nagiosxi/etc/htpasswd.users
Be sure to check out our Knowledgebase for helpful articles and solutions!