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?

Zanna
  • 69,223
  • 56
  • 216
  • 327
Mr mausam1
  • 81
  • 1
  • 1
  • 5

4 Answers4

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
Ron
  • 20,518
  • 6
  • 57
  • 72
Betro Hakala
  • 57
  • 1
  • 3
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
SiHa
  • 129
  • 7
Mr mausam1
  • 81
  • 1
  • 1
  • 5
  • 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 '17 at 15:10
1

Try using:

username - nagiosadmin
password - nagios

techraf
  • 3,306
  • 10
  • 26
  • 37
0

Use this command:

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

It will ask for new password.

Zanna
  • 69,223
  • 56
  • 216
  • 327