Starting the Samba Daemons
Two Samba processes, smbd and nmbd , need to be running for Samba to work correctly. There are three ways to start them:
Manually
Automatically, during system boot
From inetd or xinetd
Starting the Daemons Manually
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
Samba will now be running on your system and is ready to accept connections. However, keep in mind that if either of the daemons exit for any reason (including system reboots), they will need to be restarted manually.
Automatic Startup
To have the Samba daemons started automatically when the system boots, you need to add the commands listed in the previous section to your standard Unix startup scripts. The exact method varies depending on the flavor of Unix you’re using.
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
fiThis code is very simple: it checks to see if the
smbd file exists and has execute permissions,
and if it does, it starts up both of the Samba daemons on system
boot.
System V Unix
With System V, things can get a little more complex. Depending on your Unix version, you might be able to get away with making a simple ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access