$ sudo service nagios start Starting nagios:No directory, logging in with HOME=/ done.
I found this message was same-produced when I switched to user "nagios". It was caused there was no home directory for user "nagios". This script created the user "nagios" with no home directory during running to own nagios-core's home directory and start its daemon.
$ sudo su - nagios No directory, logging in with HOME=/
To do solve this, it just make home directory for that user
# Make a directory and changed the ownership $ sudo mkdir /home/nagios $ sudo chown -R nagios:nagios /home/nagios # Setting the directory as the home of nagios $ sudo usermod --home /home/nagios nagios usermod: no changes # Restarting nagios daemon, this time there is no above message $ sudo service nagios restart Running configuration check...done. Stopping nagios: done. Starting nagios: done.
Wouldn't it best to set home directory of Nagios to /usr/local/nagios instead? as that is where Nagios is installed?
답글삭제Hi, Saad.
답글삭제Thanks for comment.
This post is to create home directory of user "nagios", not the home directory of nagios monitoring. Users' home directories are usually created at /home/{user_name}/.
Ruby on rails online training
답글삭제Abinitio online training
Android online training