Page 1 of 1

Problem creating Nagios Admin user and password

Posted: Thu Mar 21, 2013 7:17 pm
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.

Re: Problem creating Nagios Admin user and password

Posted: Thu Mar 21, 2013 7:47 pm
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 

Re: Problem creating Nagios Admin user and password

Posted: Thu Mar 21, 2013 7:52 pm
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

Re: Problem creating Nagios Admin user and password

Posted: Thu Mar 21, 2013 8:29 pm
by scottwilkerson
You need the apache2-utils package to get htpasswd

Re: Problem creating Nagios Admin user and password

Posted: Fri Mar 22, 2013 8:10 am
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?

Re: Problem creating Nagios Admin user and password

Posted: Fri Mar 22, 2013 8:11 am
by devilsguest
I Also have apache2 util package in my system I do installed it with apache and configured too....

Re: Problem creating Nagios Admin user and password

Posted: Fri Mar 22, 2013 3:15 pm
by abrist
Are you running the htpasswd command as root?