Samba 3.0.2

- This document covers the compilation, installation and basic configuration of the Samba SMB server. More advanced configuration is covered in many books and online documents. A good place to start is the Samba website.
- If you install this software it is highly recommended that you keep up-to-date with security advisories published on the Samba website.
- I cannot be held responsible for the security of your SMB server. It is up to you to understand the software you are running. The setup detailed here is that of a basic file share and nothing more.
- If you spot any major errors on this page, please e-mail me using the link above.
- It is assumed that this installation takes place on a computer on which Core Linux has been successfully installed.
- No software other than the packages bundled with Core Linux have been installed.
- As described in the installation guide, it is assumed that any downloaded application source code is stored in a directory called
/appson the CD-R. - It is assumed that the Core Linux computer is attached to a network on which there is at least one other machine with internet access and a CD burner. It must also be running an SMB client program, such as
smbclienton *nix or Network Neighborhood on Windows.
Preparation
- Download the Samba source code from www.samba.org.
- Burn the file
samba-latest.tar.gzto a CD. This page assumes that the subdirectory/appsis used for the.tar.gzfile. The CD-ROM can be a multi-session disk.
Booting
- Boot your Core Linux PC.
- Login as
root. You will need to enter the password at the prompt.
Extract the source
- Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under
/mnt/cdrom. - Change to the
/appsdirectory on the CD-R. - Copy the
samba-latest.tar.gzfile to the directory/usr/src. - Change to the
/usr/srcdirectory and extract the source from the.tar.gzfile.
Configure and compile Samba
- The
.tar.gzfile will have been decompressed to a directory calledsamba-x.x.xwherex.x.xis the version number of the Samba source code. The version detailed here is Samba 3.0.2a. Change to the/usr/src/samba-3.0.2a/sourcedirectory. - Run the
./configurescript. - Run the
makeprogram. - Run the
makeprogram with the argumentinstall.
Setting up Samba
- Change to the
/usr/local/samba/libdirectory. - Edit the
smb.conffile. - Enter the text below as a basic Samba configuration. You may replace the value of the variable
workgroupwith your own workgroup name.[global]
workgroup = SIMPLE
netbios name = Core
security = share
guest ok = yes
guest account = samba
[test]
path = /home/samba/test
read only = no - Save the file and exit the text editor.
- Create the directory
/home/samba/test. - Change the access permissions of the
/home/samba/testdirectory to 0777. Although this is an insecure state to leave a folder, this is only for the purposes of testing. - Test the syntax of your
smb.conffile using thetestparmtool. - Add the user
samba.
Starting Samba
- Start the
smbdandnmbddaemons with the argument-D.
Testing Samba
- At the prompt enter:
/usr/local/samba/bin/smbclient -L Core - The screen will display the following message:
Password: - At the prompt, enter your root password.
- The system will display the following message:
There may be other machines listed under the
Domain=[SIMPLE] OS=[Unix] Server=[Samba 3.0.2a]
Sharename Type Comment
--------- ---- -------
test Disk
IPC$ IPC IPC Service (Samba 3.0.2a)
ADMIN$ Disk IPC Service (Samba 3.0.2a)
Server Comment
---------- -------
CORE Samba 3.0.2a
Workgroup Master
--------- -------
SIMPLE COREServersection if you have other computers running SMB servers in the same workgroup as your Core Linux PC. Also, the master browser may be different from that listed in theMastersection. - Assuming you saw no error messages you have correctly installed and configured Samba. Try to access the Samba server using
smbclientor another SMB application on your other PC.
Stopping Samba
- Stop the Samba servers using
killand remove the PID files.
Automating Samba
- Append the following lines to the
/etc/rc.d/rc.muscript:You can also add comments and echoes for your own information./usr/local/samba/sbin/smbd -D
/usr/local/samba/sbin/nmbd -D - Insert the following lines at the second line of the
/etc/rc.d/rc.hascript:You can also add comments and echoes for your own information.kill `cat /usr/local/samba/var/locks/smbd.pid`
rm -f /usr/local/samba/var/locks/smbd.pid
kill `cat /usr/local/samba/var/locks/nmbd.pid`
rm -f /usr/local/samba/var/locks/nmbd.pid - Reboot the system and check that Samba is running.

The text of this page is licensed under a Creative Commons License.
