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.
Problem creating Nagios Admin user and password
-
devilsguest
- Posts: 76
- Joined: Wed Mar 20, 2013 7:15 pm
- Location: New York
-
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
do not put the ./ before htpasswd
also usually the default for the file is /usr/local/nagios/etc/htpasswd.users
So
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 -
devilsguest
- Posts: 76
- Joined: Wed Mar 20, 2013 7:15 pm
- Location: New York
Re: Problem creating Nagios Admin user and password
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
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
You need the apache2-utils package to get htpasswd
-
devilsguest
- Posts: 76
- Joined: Wed Mar 20, 2013 7:15 pm
- Location: New York
Re: Problem creating Nagios Admin user and password
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
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
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.
"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.