4

This explains how to configure username and password during initial configuration:

How do I install nagios?

How can I change that using config files on server if I've lost the username and password?

4 Answers 4

5
$ find / -name nagios*.conf

###/etc/httpd/conf.d/nagios.conf

$ cat /etc/httpd/conf.d/nagios.conf | grep AuthUserFile 
###AuthUserFile /etc/nagios/passwd
$ sudo htpasswd -c /etc/nagios/passwd nagiosadmin
1
  • 1
    Thank you for the 'how to find your passwd' file... that really helped me.
    – dna
    Aug 1, 2018 at 12:25
4

I found the answer

sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin

Enter a strong password when prompted.

Note the -c replaces all existing passwords. To simply update an existing one (without affecting others):

sudo htpasswd /etc/nagios3/htpasswd.users nagiosadmin
1
  • Note the -c replaces all existing passwords. To simply update an existing one (without affecting others) sudo htpasswd /etc/nagios3/htpasswd.users nagiosadmin
    – gerardw
    Jan 29, 2017 at 15:10
1

Try using:

username - nagiosadmin
password - nagios

0

Use this command:

htpasswd /usr/local/nagios/etc/htpasswd.users nagiosadmin

It will ask for new password.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .