Page 1 of 1

unable to reset nagiosadmin password

Posted: Tue Mar 10, 2015 2:35 am
by proquibas
Hi,

I had to restore nagios xi database but after finished I can't acces to the gui portal with the nagiosadmin password. I tried the script /usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php --password=<password> but shows an error message:
ERROR: Unable to get user id for nagiosadmin account.

If I try to acces to http://<nagiosserver>/nagios it acces right but not on http://<nagiosserver>/nagiosxi
Can you help me?

Thanks!

Re: unable to reset nagiosadmin password

Posted: Tue Mar 10, 2015 10:34 am
by tmcdonald
Sounds like the postgres database was not restored. How did you perform the restore? Was it just for the mysql db or what?

Re: unable to reset nagiosadmin password

Posted: Tue Mar 10, 2015 11:54 pm
by proquibas
Hi,

I used the following command:

su postgres -c 'pg_resetxlog -f -x 0x9A00000 -m 0x10000 -O 0x10000 -l 0x1,0xB67,0x58 /var/lib/pgsql/data'

I miss something?

Thanks for reply!!

Re: unable to reset nagiosadmin password

Posted: Wed Mar 11, 2015 11:29 am
by ssax
So did you restore the files under /var/lib/pgsl/data from a file level backup?

Re: unable to reset nagiosadmin password

Posted: Thu Mar 12, 2015 12:47 am
by proquibas
Is the first time I execute this procedure so I don't know what's the next step to do...

Re: unable to reset nagiosadmin password

Posted: Thu Mar 12, 2015 9:41 am
by tmcdonald
I guess my question I should have asked was why you needed a restore? We have a set of backup and restore scripts that handles postgres, mysql, and the various configs and even PHP files for an XI install. Knowing the reason for the restore will help.