Starting the Samba Daemons
There are two Samba processes, smbd and nmbd , that need to be running for Samba to work correctly. There are three ways to start:
By hand
As stand-alone daemons
From inetd
Starting the Daemons by Hand
If you’re in a hurry, you can start the Samba daemons by hand. As root, simply enter the following commands:
#/usr/local/samba/bin/smbd -D#/usr/local/samba/bin/nmbd -D
At this point, Samba will be running on your system and will be ready to accept connections.
Stand-alone Daemons
To run the Samba processes as stand-alone daemons, you need to add the commands listed in the previous section to your standard Unix startup scripts. This varies depending on whether you have a BSD-style Unix system or a System V Unix.
BSD Unix
WIth a BSD-style Unix, you need to append the following code to the rc.local
file, which is typically found in the /etc
or /etc/rc.d directories:
if [ -x /usr/local/samba/bin/smbd]; then echo "Starting smbd..." /usr/local/samba/bin/smbd -D echo "Starting nmbd..." /usr/local/samba/bin/nmbd -D fi
This code is very simple; it checks to see if the smbd
file has execute permissions on it, and if it does, it starts up each of the Samba daemons on system boot.
System V Unix
With System V, things can get a little more complex. System V typically uses scripts to start and stop daemons on the system. Hence, you need to instruct Samba how to operate when it starts and when it stops. You can modify the contents of the /etc/rc.local directory and add something ...