ntlmaps misteriously stopped working on my box. /etc/init.d/ntlmaps start, however, continued giving out a [OK] message. So I checked out /var/log/ntlmaps, which was completely empty. In order to figure out what the hell was happening, I had to manually run: export PID_FILE="/var/run/ntlmaps.pid" touch ${PID_FILE} chown ntlmaps:ntlmaps ${PID_FILE} start-stop-daemon --background --exec /usr/bin/python \ --make-pidfile --pidfile ${PID_FILE} --chuid ntlmaps -- /usr/bin/ntlmaps < /dev/null only to find out that I had incorrectly set the permissions of the config files in /etc/ntlmaps to root:root 640, while the daemon was run as user ntlmaps so it couldn't access them any more. Expected behaviour: 1)since the process crashes immediately, I expect that /etc/init.d/ntlmaps returns [ERROR]. 2)the crash message should be either written in the console when I run /etc/init.d/ntlmaps, and/or in /var/log/ntlmaps.
ntlmaps doesn't fork itself when executed, so we have to use start-stop-daemon --background in order to run it as a service. In any case, the fault is yours. By default, /etc/ntlmaps/server.cfg is installed with these permissions: -rw-r----- 1 root ntlmaps 8523 2009-08-16 14:20 server.cfg Closed with UPSTREAM resolution.
I've been living with this for about a year - I worked around it by having ntlmaps run (as root) in a start-up script. I agree with the original poster - the only indication that something is wrong is the fact that it doesn't work and /etc/init.d/ntlmaps status returns "crashed" - BIG thanks to crusaderky btw. I spent ages trying to get more information on it, modifying the daemon init script etc... I personally have no idea how the permissions were changed on the file and in my efforts i failed to notice the --chuid ntlmaps I understand that it's almost definitely my fault, but wouldn't it be better to state that something has gone wrong and the cause than to cheerfully say [ ok ] and leave the user scratching their head? Anyway... pretty please?
I'd like to propose this as an Enhancement, for the benefit of future idiots like myself. I've been living with this for about a year - I worked around it by having ntlmaps run (as root) in a start-up script. I agree with the original poster - the only indication that something is wrong is the fact that it doesn't work and /etc/init.d/ntlmaps status returns "crashed" - BIG thanks to crusaderky for the fix btw. I spent ages trying to get more information on it, modifying the daemon init script, log-diving etc... I personally have no idea how the permissions were changed on the file and in my efforts i failed to notice the --chuid ntlmaps (I assumed that it was run as root) I understand that it's almost definitely my fault, but wouldn't it be better to state that something has gone wrong and the cause than to cheerfully say [ ok ] and leave the user scratching their head? Anyway... pretty please?