Skip to Main Content
Using Samba
book

Using Samba

by Robert Eckstein, David Collier-Brown, Peter Kelly
November 1999
Beginner to intermediate content levelBeginner to intermediate
413 pages
16h 7m
English
O'Reilly Media, Inc.
Content preview from Using Samba

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 ...

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.
Start your free trial

You might also like

Using Samba, Second Edition

Using Samba, Second Edition

Jay Ts, Robert Eckstein, David Collier-Brown
Linux: Powerful Server Administration

Linux: Powerful Server Administration

Uday Sawant, Oliver Pelz, Jonathan Hobson, William Leemans

Publisher Resources

ISBN: 1565924495Supplemental ContentCatalog PageErrata