Start and stop the samba server

PayPC System Mail Subscriber spammail at quanta.paypc.com
Thu Sep 24 04:35:45 GMT 1998


> Is there a good way to stop and restart the samba server...
> for example to have it re read the smb.conf, without rebooting the
> actual pc?
>  
> if I should kill a process should I kill them all ??? if so is there an
> efficent way to do this?

Heheheh, you guys should read your unix command line help. :)  The command 
you want is:

killall -HUP smbd

killall kills (or sends the specified signal) to all exectuables which the 
specified name.

I've never had problems just SIGTERM'ing (no signal specified to 
kill/killall) smbd's on "live" sessions.  The only problem I'd envisage would 
be with oplocked files (smbstatus is your friend!)....  in which case -HUP 
would be the preferred technique - though the changes aren't applied to 
already-established sessions.  It sounds like samba automagically re-reads 
its smb.conf anyhow; I excerpt from the current samba man page:

       The configuration file, and any files  that  it  includes,
       are  automatically  reloaded every minute, if they change.
       You can force a reload by sending a SIGHUP to the  server.
       Reloading  the  configuration file will not affect connec-
       tions to any service that is already established.   Either
       the user will have to disconnect from the service, or smbd
       killed and restarted.

So if you have a "dead time" auto-logout (as I do), the changes will be 
picked up eventually.  If you wish to force an immediate change, than 
SIGTERMing the sessions is the only way (that is, kill/killall without a 
specified signal name).

Ya know, every time I install/radically alter/remove vital system services 
from my always-busy intranet server box without having to run for another cd, 
reboot multiple times, or experience any downtime or interruption of service 
whatsoever, I thank whatever wisdom resides within me which prodded me into 
deep-sixing my NT4 servers.  (We also manage to get one box to do what 
required two boxes to perform satisfactorily, and then some.).

=Rob=




More information about the samba mailing list