[Samba] What happened to "samba start/stop"?

Joel Hammer Joel at HammersHome.com
Sat Feb 2 06:52:14 GMT 2002

The startup scripts for RH hang out in /etc/rc.d/init.d, or someplace
close to that. These distro startup scripts are fairly complicated. You don't
need them.
One problem you may be having is that the lock files and binary locations
are not where the startup script expects them to be, if you have upgraded
samba from a non Red Hat rpm or used a tar.gz file and compiled.
So, I would used a simple startup script like the one I use. This works for
plain vanilla samba downloads from samba.org.
Just make sure that your binary locations and lock files agree with the
locations given in this script.
Find the binaries with "which smbd" as root.
To find where the lock files are, try:
strings `which smbd` | grep /lock
On my redhat box, if I su as root, "which" doesn't find the binaries, so you
may need to log in as root for which to work properly. Or use 
locate smbd | grep smbd$ 
as a last resort. That won't show necessarily the binary that
is run when you invoke smbd without any path prefix, but it will help.
=================A simple startup script=====================
case "$1" in
  killall smbd
  killall nmbd
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D

  killall smbd
  killall nmbd
 kill -SIGHUP `cat /usr/local/samba/var/locks/smbd.pid` 
 kill -SIGHUP `cat /usr/local/samba/var/locks/nmbd.pid` 
 echo Usage: 
 echo start stop reload
exit 0

After you change smbd.conf, stopping/restarting smbd is the only way I know
to make sure your changes take effect immediately.

On Sat, Feb 02, 2002 at 09:32:37PM +0800, Ambrose Scafidi wrote:
> Howdy all,
> 	Just upgraded my Linux box to RH 7.2 and am having a lot of "fun" 
> discovering all the changes from my previous, and familiar, RH7.0 . I 
> managed to get samba 2.2.1a-4 up and running with less fuss than I have 
> ever had before (yay) but I could not help but notice that my old means of 
> restarting the service is no more. I am utterly ignorant of how these 
> things work, but when I alter my smb.conf, is the only way to enact the 
> changes immediately via killing the daemons and restarting with "smbd -D ; 
> nmbd -D".
> 	A second quick point, where is SWAT?
> In Zeros and Ones,
> 	Ambrose.
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list