Closed box293 closed 7 years ago
SMF requires a home directory. If you run make install-groups-users
it will create the home directory if that user does not yet exist. If an admin runs useradd
without the -m
flag, there's not much I can do about that. In theory, I could check if the /export/home/<userid>
directory exists, but I don't think it's guaranteed to be in that location. It could be (for example) /export/home/n/nagios
.
Thats a good point about make install-groups-users
, I had not run it as I assumed Nagios Core had taken care of that when it was installed. I will re-visit my Nagios Core install steps to ensure the make install-groups-users
is being run.
useradd -d localhost:/export/home/nagios -m nagios
If the nagios user (--with-ndo2db-user) does not have a home directory, then the ndo2db service will not start. To demonstrate, disable the service and make it so there is no home directory:
Now enable the service:
Now to make sure there is a home directory and start the service:
I also tested this behavior on a CentOS 6.x server and the ndo2db service will run fine if the home directory does not exist.