htpasswd error

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
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

htpasswd error

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: htpasswd error

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: htpasswd error

Post by DOkuwa »

thanks

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

Re: htpasswd error

Post 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!
Locked