SAMBA startup + shutdown

Albrecht Schlosser ajs856 at tiscali.de
Mon Dec 20 11:32:15 GMT 2004


Hi,

here are some minor problems I found with Samba startup and shutdown, using 
Samba 2.2.8, release 2004-1021 with "SAMBA_SHUTDOWN.COM by R. Regier 15-Sep-04":

(1) The shutdown procedure disables the services SMBD and SWAT. This is useful 
(only) if you want to (temporary) disable the service(s) on a running system and 
start them later again. The unmodified procedure SAMBA_STARTUP.COM does not 
enable the service, because they should be enabled by the TCPIP startup 
procedure. However, this is not true, if you run SAMBA_SHUTDOWN.COM for any 
reason and want to start the service again with SAMBA_STARTUP.COM.

I'm not sure what would be the best solution, but for now I decided to uncomment 
the "enable service" commands in the startup procedure. Maybe it would be a good 
idea to add SAMBA_STOP.COM and SAMBA_START.COM (or similar) to stop and start 
Samba temporarily ...

(2) One bigger problem with this release (and previous 2.2.8 releases) is the 
fact that the NMBD process creates the file "samba_root:[var.locks]nmbd.pid" and 
checks this file when started. NMBD exits with the following error message in 
the file "SAMBA_ROOT:[VAR]LOG.NMBD":

----------------------------
[2004/12/20 11:07:17, 0] 
DISK$SWAP:[JYC.SAMBA.SAMBA-2_2_8-VMS73-SRC.SOURCE.LIB]PIDFILE.C;10:(87)
   ERROR: nmbd is already running. File /samba_root/var/locks/nmbd.pid exists 
and process id 543 is running.
----------------------------

It happened to me that the process was running indeed, but it was another server 
process. Therefore NMBD exited whenever it was started :-(

My solution is to add these lines to SAMBA_SHUTDOWN.COM:


$       SECTION3:
$!
$! delete obsolete .PID file ...
$!
$    if f$search("samba_root:[var.locks]nmbd.pid").nes. "" then -
         delete/log/noconf samba_root:[var.locks]nmbd.pid;*
$!
$ ECHO "[ Finished NMBD process termination ]"


(the first and last lines are from the original procedure).

Is there a way to stop NMBD in a "safe" way that it can delete the .PID file? If 
not, then I think that the check should not be done (under VMS). Setting the 
process name to "NMBD" is safe enough if the UIC group of the NMBD process is known.

Regards

Albrecht



More information about the samba-vms mailing list