Page 1 of 1

Forgot nagiosna password

Posted: Sat Aug 04, 2018 5:41 am
by dais
I've tried to login to http://localhost/nagiosna/login
But I forgot password and tried to reset,

It keeps loading after giving Username nna and it shows:
Screenshot from 2018-08-04 16-08-03.png
I've entered correct Username. How to reset password?

Re: Forgot nagiosna password

Posted: Mon Aug 06, 2018 2:02 pm
by tgriep
There is a script you can use to reset the password.
Login to the NNA server as root and go to this folder.

Code: Select all

/usr/local/nagiosna/scripts
Run this script below, replacing newpassword with your new password.

Code: Select all

./reset_nagiosadmin_password.sh -p newpassword
Then you should be able to login to the NNA GUI with the new password.

Re: Forgot nagiosna password

Posted: Tue Aug 07, 2018 6:40 am
by dais
tgriep wrote:There is a script you can use to reset the password.
Login to the NNA server as root and go to this folder.

Code: Select all

/usr/local/nagiosna/scripts
Run this script below, replacing newpassword with your new password.

Code: Select all

./reset_nagiosadmin_password.sh -p newpassword
Then you should be able to login to the NNA GUI with the new password.
It says:

Code: Select all

/usr/local/nagiosna/scripts# ./reset_nagiosadmin_password.sh -p passwd
./reset_nagiosadmin_password.sh: 35: [: passwd: unexpected operator
./reset_nagiosadmin_password.sh: 49: ./reset_nagiosadmin_password.sh: Bad substitution

Re: Forgot nagiosna password

Posted: Tue Aug 07, 2018 8:34 am
by tgriep
Your default shell may not be bash and we need to change the script to use it.

Edit the reset_nagiosadmin_password.sh script and change the top line from

Code: Select all

#!/bin/sh
to

Code: Select all

#!/bin/bash
Save it out and try and reset the password again.

Re: Forgot nagiosna password

Posted: Wed Aug 08, 2018 12:02 am
by dais
tgriep wrote:Your default shell may not be bash and we need to change the script to use it.

Edit the reset_nagiosadmin_password.sh script and change the top line from

Code: Select all

#!/bin/sh
to

Code: Select all

#!/bin/bash
Save it out and try and reset the password again.

The new password is set after modifying in reset_nagiosadmin_password.sh script from #!/bin/sh to #!/bin/bash.

Code: Select all

./reset_nagiosadmin_password.sh -p newpassword
It worked!

Re: Forgot nagiosna password

Posted: Wed Aug 08, 2018 8:58 am
by tgriep
That is good news. I'll close and lock the post as solved. Feel free to open a new post for any new issues.