Problem creating Nagios Admin user and password

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Problem creating Nagios Admin user and password

Post by devilsguest »

Hi
I am new to nagios. Here is a weird problem that I am facing with nagios when creating nagios username and password using htpasswd -c command.As per my knowledge ./htaccess files are looking fine and have no problems. I am trying the command ./htpasswd -c /usr/local/nagios/etc/htpassword.users nagiosadmin which is throwing back error saying -bash: ./htpasswd: cannot execute binary file. Also, when i try to use the command as htpasswd -c /usr/local/nagios/etc/htpassword.users nagiosadmin throws me back error saying -bash: htpasswd: command not found. FYI I am running this command from /usr/local/apache2/bin. It would be great if someone can get me out of this problem that I am facing. BTW I am using linux server as my system.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problem creating Nagios Admin user and password

Post by scottwilkerson »

do not put the ./ before htpasswd

also usually the default for the file is /usr/local/nagios/etc/htpasswd.users

So

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: Problem creating Nagios Admin user and password

Post by devilsguest »

when i try to use the command as htpasswd -c /usr/local/nagios/etc/htpassword.users nagiosadmin throws me back error saying -bash: htpasswd: command not found.

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problem creating Nagios Admin user and password

Post by scottwilkerson »

You need the apache2-utils package to get htpasswd
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: Problem creating Nagios Admin user and password

Post by devilsguest »

I can see htpasswd with read write and execute permissions in my apache2/bin. So, What exactly am I suppose to do here? Do you think just the downloading apache2 util package will fix the issue?
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: Problem creating Nagios Admin user and password

Post by devilsguest »

I Also have apache2 util package in my system I do installed it with apache and configured too....
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Problem creating Nagios Admin user and password

Post by abrist »

Are you running the htpasswd command as root?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked