The init script calls start-stop-daemon to start and stop the daemons without using pidfiles. This means that on systems with multiple daemon instances (for example, where a user has made their own secondary init script, see: , or where the user is running samba within linux container guests), the stop call will kill all instances instead of just one. PID files should always be used in init scripts where daemon support is available. Reproducible: Always Steps to Reproduce: 1. Start the daemon: /etc/init.d/samba start 2. Start another copy of the daemon with another configuration file, or in a linux container 3. Stop the daemon: /etc/init.d/samba stop Actual Results: All daemons die, or wrong daemon dies. Expected Results: Only correct deamon dies.
Your bug is similar to bug #302123 but dunno if it's really a dupe... PID-files cannot be used because each connection established to the samba server creates a new smbd process. So when stopping samba via init script through the PID-file only the parent smbd would be stopped but all child smbd processes would still be left running which is IMHO not acceptable.
If this is really the case then some method to detect and kill all children should be used. If necessary, this could be pushed upstream to start-stop-daemon people, it's only some /proc logic anyway, right?
*** This bug has been marked as a duplicate of bug 302123 ***