Page 1 of 1

htpasswd error

Posted: Fri Oct 06, 2017 5:09 am
by DOkuwa
hello I am getting this error when running this command as ROOT
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
htpasswd: cannot create file /usr/local/nagios/etc/htpasswd.users

also

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
No command ' sudo' found, did you mean:
Command 'sudo' from package 'sudo' (main)
Command 'sudo' from package 'sudo-ldap' (universe)
 sudo: command not found
also running this
sestatus
The program 'sestatus' is currently not installed. You can install it by typing:
apt install policycoreutils

Re: htpasswd error

Posted: Fri Oct 06, 2017 10:41 am
by scottwilkerson
This directory must exist before running the command /usr/local/nagios/etc/

try

Code: Select all

mkdir -p /usr/local/nagios/etc/
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Re: htpasswd error

Posted: Fri Oct 06, 2017 11:14 am
by DOkuwa
thanks

I have sorted it out
I just have to reinstall it
I think I missed some steps

Re: htpasswd error

Posted: Fri Oct 06, 2017 11:29 am
by kyang
Glad you were able to solve this! We will be closing this topic as resolved!

If you have more questions, feel free to create another thread!

Thank you for using the Nagios Support Forum!